Implement Molotov Cocktail
This commit is contained in:
parent
938a56231a
commit
a37adf2972
17 changed files with 255 additions and 20 deletions
|
|
@ -1,3 +1,5 @@
|
|||
using System.Collections;
|
||||
|
||||
public enum TriggerExpiration {
|
||||
Never,
|
||||
StartOfNextHeroTurn,
|
||||
|
|
@ -22,9 +24,15 @@ public class Trigger {
|
|||
this.repetition = repetition;
|
||||
}
|
||||
|
||||
public void Run(IBattleEffectApplier effectApplier) {
|
||||
if (this.expired) return;
|
||||
callback(effectApplier);
|
||||
public IEnumerator Run(IBattleEffectApplier effectApplier,
|
||||
MonsterViewpoint viewpoint,
|
||||
BattlePlayerControls playerControls) {
|
||||
if (this.expired) {
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return callback(effectApplier, viewpoint, playerControls);
|
||||
|
||||
if (this.repetition == TriggerRepetition.Once) {
|
||||
this.expired = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue