Implement Molotov Cocktail
This commit is contained in:
parent
938a56231a
commit
a37adf2972
17 changed files with 255 additions and 20 deletions
30
Assets/Battle/CardsHeroes/MolotovCocktailHCard.cs
Normal file
30
Assets/Battle/CardsHeroes/MolotovCocktailHCard.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MolotovCocktailHCard : HeroCard
|
||||
{
|
||||
public MolotovCocktailHCard(BattleParticipant owner)
|
||||
: base(owner, HCardId.MolotovCocktail, "Molotov Cocktail", 3, CardType.Enchantment,
|
||||
"At start of hero turn, deal 1 damage to all enemies.") {
|
||||
}
|
||||
|
||||
public override IEnumerator Use(IBattleEffectApplier effectApplier,
|
||||
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
|
||||
StepTrigger trigger = new StepTrigger(
|
||||
RoundStep.StartOfHeroTurn,
|
||||
this.AtStartOfHeroTurn,
|
||||
TriggerExpiration.Never,
|
||||
TriggerRepetition.Multiple);
|
||||
effectApplier.Apply(new ArmStepTriggerEffect(trigger));
|
||||
yield break;
|
||||
}
|
||||
|
||||
private IEnumerator AtStartOfHeroTurn(IBattleEffectApplier effectApplier,
|
||||
MonsterViewpoint viewpoint, BattlePlayerControls playerControls) {
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
MassDamageEffect damageEffect = new MassDamageEffect(TeamChoice.Monsters, 1);
|
||||
effectApplier.Apply(damageEffect);
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue