using System.Collections; using System.Collections.Generic; using UnityEngine; public class GolemChargeMCard : MonsterCard { public GolemChargeMCard(BattleParticipant owner) : base(owner, MCardId.GolemCharge, "Golem Charge", 5, CardType.Attack, "Deals 4 damage to target and stuns it. Acquire a Golem Berserk. " + "Target: farthest hero.") { } public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) { yield return new WaitForSeconds(0.5f); BattleParticipant target = AIUtils.GetFarthestHero(monsterViewpoint, this.owner); DealDamageEffect damageEffect = new DealDamageEffect(target, 4); effectApplier.Apply(damageEffect); StatusEffect statusEffect = new StatusEffect(target, BattleStatus.Stun); effectApplier.Apply(statusEffect); AcquireCardsEffect acquireEffect = new AcquireCardsEffect( MCardId.GolemBerserk, BattleZone.DiscardPile, this.owner); effectApplier.Apply(acquireEffect); yield break; } }