Implement GraniteDefense
This commit is contained in:
parent
ef9ec43c8a
commit
dd9b360bfc
5 changed files with 39 additions and 2 deletions
21
Assets/Battle/CardsMonsters/GraniteDefenseMCard.cs
Normal file
21
Assets/Battle/CardsMonsters/GraniteDefenseMCard.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GraniteDefenseMCard : MonsterCard
|
||||
{
|
||||
public GraniteDefenseMCard(BattleParticipant owner)
|
||||
: base(owner, MCardId.GolemBerserk, "Granite Defense", 3, CardType.Skill,
|
||||
"Block 5 damage on other allies.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier, MonsterViewpoint monsterViewpoint) {
|
||||
yield return new WaitForSeconds(1f);
|
||||
foreach (BattleMonster monster in monsterViewpoint.Monsters) {
|
||||
if (monster != this.owner) {
|
||||
effectApplier.Apply(new BlockEffect(monster, 5));
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue