diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-20 22:27:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-20 22:27:01 +0200 |
commit | 25f0a50c8bc6dc028d0c0497e71d515576bdd211 (patch) | |
tree | e94d312217594af5139bbcdb066fadb91aab876b | |
parent | 712fdea3e8e8694996db89eff462018a11b2a133 (diff) | |
download | wilderness-war-25f0a50c8bc6dc028d0c0497e71d515576bdd211.tar.gz |
Fix crash when activating 0 leaders/units individually.
-rw-r--r-- | rules.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2494,8 +2494,12 @@ function goto_pick_first_move() { logbr() log("Selected\n" + game.activation.map(log_piece_name_and_place).join(",\n") + ".") game.state = 'pick_move' - } else { + } else if (game.activation.length > 0) { goto_move_piece(game.activation.pop()) + } else { + delete game.activation_value + delete game.activation + end_action_phase() } } |