diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-02-01 20:56:12 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-02-01 20:57:58 +0100 |
commit | a3a6f64bff60b5b216d24561a722775faa676669 (patch) | |
tree | a38c886e593c0f6a1ee4b96ef6078a91f033c963 /rules.js | |
parent | 7ee88861864e35f894bd45877a7f997715193252 (diff) | |
download | wilderness-war-a3a6f64bff60b5b216d24561a722775faa676669.tar.gz |
Fix check for recapturing fortresses.
Should only check for presence of enemy units/amphib; not control.
A besieged fortress that loses all defenders should revert immediately.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1867,6 +1867,7 @@ function recapture_french_fortress(s) { set_all_pieces_outside(s) set_delete(game.british.fortresses, s) set_add(game.french.fortresses, s) + delete game.sieges[s] award_french_vp(3) } @@ -1875,6 +1876,7 @@ function recapture_british_fortress(s) { set_all_pieces_outside(s) set_delete(game.french.fortresses, s) set_add(game.british.fortresses, s) + delete game.sieges[s] award_british_vp(3) } @@ -1952,10 +1954,10 @@ function lift_sieges_and_amphib() { // Recapture abandoned enemy fortresses. for (let s of originally_french_fortresses) - if (set_has(game.british.fortresses, s) && is_french_controlled_space(s)) + if (set_has(game.british.fortresses, s) && !has_british_units(s) && !has_amphib(s)) recapture_french_fortress(s) for (let s of originally_british_fortresses) - if (set_has(game.french.fortresses, s) && is_british_controlled_space(s)) + if (set_has(game.french.fortresses, s) && !has_french_units(s)) recapture_british_fortress(s) // Remove forts u/c if solely occupied by enemy drilled troops |