Implement statuses, GolemCharge, GolemBerserk, stun
This commit is contained in:
parent
caf782c884
commit
ef9ec43c8a
16 changed files with 260 additions and 38 deletions
27
Assets/Battle/CardsMonsters/GolemBerserkMCard.cs
Normal file
27
Assets/Battle/CardsMonsters/GolemBerserkMCard.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue