diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1600,7 +1600,8 @@ states.combat_phase = { }, town: function (where) { remove_from_array(game.combat_list, where); - if (game.attacker[where] == game.jihad) { + let attacker = game.attacker[where] || besieging_player(where); + if (attacker == game.jihad) { game.active = game.attacker[where]; game.state = 'use_jihad_event'; game.where = where; @@ -2225,6 +2226,13 @@ function resume_storm_battle() { return next_combat_round(); } + if (game.storming.length == 0) { + console.log("STORM BATTLE WON BY DEFENDER", ENEMY[game.active]); + game.halfhit = null; + log("Storming repulsed."); + return next_combat_round(); + } + game.state = 'storm_battle'; pump_battle_step(is_storm_attacker, is_storm_defender); } |