27 lines
961 B
C#
27 lines
961 B
C#
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;
|
|
}
|
|
}
|