Implement Echolocation
This commit is contained in:
parent
5962ea9fd6
commit
939b3e2664
6 changed files with 149 additions and 16 deletions
21
Assets/Battle/CardsMonsters/EcholocationMCard.cs
Normal file
21
Assets/Battle/CardsMonsters/EcholocationMCard.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue