summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-09-20 18:00:46 +0200
committerDaniel Weipert <code@drogueronin.de>2023-09-20 18:00:46 +0200
commit647ca9a22a3bc490172c62c4d1c265f63691a814 (patch)
treeec4d0310b9a677900eaf7bdf6a52df4670d6c17c
parent02490b07af89cffbb72c859677dff333a296f5c5 (diff)
hotfix null statusEffect on postAction eventHEADmain
-rw-r--r--resources/js/game.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/js/game.js b/resources/js/game.js
index 61e2211..5ab70bd 100644
--- a/resources/js/game.js
+++ b/resources/js/game.js
@@ -626,7 +626,9 @@ const Game = {
}
Game.addBattlePhaseEvent('postAction', monster, () => {
- monster.statusEffect.turnsLeft--;
+ if (monster.statusEffect) {
+ monster.statusEffect.turnsLeft--;
+ }
});
},