Implement statuses, GolemCharge, GolemBerserk, stun

This commit is contained in:
henriquenakashima 2020-09-20 22:02:34 -04:00
parent caf782c884
commit ef9ec43c8a
16 changed files with 260 additions and 38 deletions

View file

@ -0,0 +1,24 @@
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) {
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;
}
}