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,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GolemBerserkMCard : MonsterCard
{
public GolemBerserkMCard(BattleParticipant owner)
: base(owner, MCardId.GolemBerserk, "Golem Berserk", 7, CardType.Attack,
"Deals 8 damage to target and 4 damage to other enemies."
+ "Target: nearest hero.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
BattleParticipant target = AIUtils.GetNearestHero(monsterViewpoint, this.owner);
effectApplier.Apply(new DealDamageEffect(target, 8));
yield return new WaitForSeconds(1f);
foreach (BattleHero hero in monsterViewpoint.Heroes) {
if (hero != target) {
effectApplier.Apply(new DealDamageEffect(hero, 4));
}
}
yield return new WaitForSeconds(1f);
yield break;
}
}