summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-02 21:54:02 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commite7fdf9c26cae3e26731cb7e7b721f35414937442 (patch)
tree5556db5fc8efad015adf433bab2722dd25bf8342
parent3ccac2e0cac58a1feedc82a75e392259a4ecfa95 (diff)
downloadnevsky-e7fdf9c26cae3e26731cb7e7b721f35414937442.tar.gz
Fix garrison bugs.
-rw-r--r--rules.js9
1 files 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)")