Implement Echolocation

This commit is contained in:
henriquenakashima 2020-10-13 00:42:55 -04:00
parent 5962ea9fd6
commit 939b3e2664
6 changed files with 149 additions and 16 deletions

View file

@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EcholocationMCard : MonsterCard
{
public EcholocationMCard(BattleParticipant owner)
: base(owner, MCardId.Echolocation, "Echolocation", 1, CardType.Skill,
"Block 1 damage on all Bats.") {
}
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
yield return new WaitForSeconds(0.6f);
foreach (BattleMonster monster in monsterViewpoint.Monsters) {
if (monster.Id == MonsterId.Bat) {
effectApplier.Apply(new BlockEffect(monster, 1));
yield return new WaitForSeconds(0.3f);
}
}
}
}