diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-01-02 21:54:02 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | e7fdf9c26cae3e26731cb7e7b721f35414937442 (patch) | |
tree | 5556db5fc8efad015adf433bab2722dd25bf8342 | |
parent | 3ccac2e0cac58a1feedc82a75e392259a4ecfa95 (diff) | |
download | nevsky-e7fdf9c26cae3e26731cb7e7b721f35414937442.tar.gz |
Fix garrison bugs.
-rw-r--r-- | rules.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -6755,6 +6755,8 @@ function goto_strike_storm() { game.battle.hits = hits game.battle.xhits = xhits + // TODO: "select_strike_group" w/ garrison? + goto_assign_hits() } @@ -6952,7 +6954,7 @@ function is_flanked_target() { } function has_valid_target() { - if (game.battle.storm && game.active === game.battle.attacker && game.battle.garrison) + if (game.battle.storm && game.active !== game.battle.attacker && game.battle.garrison) return true return game.battle.targets.length > 0 } @@ -6965,7 +6967,10 @@ function goto_assign_hits() { return } - log(`${format_group(game.battle.targets)}`) + if (game.battle.storm && game.active !== game.battle.attacker && game.battle.garrison) + log("Garrison") + else + log(`${format_group(game.battle.targets)}`) if (has_sa_without_rd()) { console.log("SA without RD (getting hit)") |