diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-01-10 12:23:49 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:39 +0100 |
commit | 0529cc0a1697c78996c4f41971d6cfbdbed9bae2 (patch) | |
tree | 847bd54ddea3ddb63d9460f007127f5ba0c9486a | |
parent | 41b8a6d770b6b9f815334505231ee0f9f6b017ed (diff) | |
download | nevsky-0529cc0a1697c78996c4f41971d6cfbdbed9bae2.tar.gz |
Routing lords in D should reassess SA without RD choice.
-rw-r--r-- | rules.js | 31 |
1 files changed, 18 insertions, 13 deletions
@@ -7879,20 +7879,25 @@ function rout_lord(lord) { game.battle.array[pos] = NOBODY // Strike left or right or reserve defender - if (pos >= A1 && pos <= D3) { - if (is_attacker_step()) - game.battle.fc = strike_left_or_right(is_striking, A2, D1, D2, D3) - else - game.battle.fc = strike_left_or_right(is_striking, D2, A1, A2, A3) - } else { - if (is_sa_without_rd()) { + if (pos >= A1 && pos <= A3) { + game.battle.fc = strike_left_or_right(is_striking, D2, A1, A2, A3) + } + + else if (pos >= D1 && pos <= D3) { + game.battle.fc = strike_left_or_right(is_striking, A2, D1, D2, D3) + if (is_sa_without_rd()) + game.battle.rc = strike_reserve_defender() + } + + else if (pos >= SA1 && pos <= SA3) { + game.battle.rc = strike_left_or_right(is_striking, RD2, SA1, SA2, SA3) + } + + else if (pos >= RD1 && pos <= RD3) { + game.battle.rc = strike_left_or_right(is_striking, SA2, RD1, RD2, RD3) + // TODO: not until after reposition! + if (is_sa_without_rd()) game.battle.rc = strike_reserve_defender() - } else { - if (is_attacker_step()) - game.battle.rc = strike_left_or_right(is_striking, SA2, RD1, RD2, RD3) - else - game.battle.rc = strike_left_or_right(is_striking, RD2, SA1, SA2, SA3) - } } } |