From e7fdf9c26cae3e26731cb7e7b721f35414937442 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 2 Jan 2023 21:54:02 +0100 Subject: Fix garrison bugs. --- rules.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 8472edf..c3ceb2a 100644 --- a/rules.js +++ b/rules.js @@ -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)") -- cgit v1.2.3