22 lines
872 B
C#
22 lines
872 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class VampireFangsMCard : MonsterCard
|
|
{
|
|
public VampireFangsMCard(BattleParticipant owner)
|
|
: base(owner, MCardId.VampireFangs, "Vampire Fangs", 2, CardType.Attack,
|
|
"Steals 2 HP from target. Target: highest HP hero.") {
|
|
}
|
|
|
|
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
|
|
BattleParticipant target = AIUtils.GetHeroWithHighestHP(monsterViewpoint);
|
|
DealDamageEffect damageEffect = new DealDamageEffect(Owner, target, 2);
|
|
effectApplier.Apply(damageEffect);
|
|
if (damageEffect.AmountDealt > 0) {
|
|
HealEffect healEffect = new HealEffect(this.owner, damageEffect.AmountDealt);
|
|
effectApplier.Apply(healEffect);
|
|
}
|
|
yield break;
|
|
}
|
|
}
|