diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-11-26 11:39:56 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 2bead9ba196c4b66e8f8c887946368e108f1b8be (patch) | |
tree | 4ea4294e64c574a206d9ae35dd1181f985be328b /rules.js | |
parent | 3a2908cfcbf60dc2db73242134b978466a73ba7a (diff) | |
download | wilderness-war-2bead9ba196c4b66e8f8c887946368e108f1b8be.tar.gz |
Fix placing Amherst, Forbes, and Wolfe into pool twice!
If William Pitt is played after 1758 when the scenario rules have
already placed them into the pool, don't put them back in.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -2103,7 +2103,9 @@ function find_closest_friendly_unbesieged_fortification(start) { // SEQUENCE OF PLAY -function place_amherst_forbes_and_wolfe_in_pool() { +function place_amherst_forbes_and_wolfe_in_pool(is_event) { + if (is_event && game.year >= 1759) + return log("Placed Amherst, Forbes, and Wolfe into the British leader pool.") game.british.pool.push(AMHERST) game.british.pool.push(FORBES) @@ -2111,8 +2113,6 @@ function place_amherst_forbes_and_wolfe_in_pool() { } function start_year() { - if (game.year === 1759 && !game.events.pitt) - place_amherst_forbes_and_wolfe_in_pool() game.season = EARLY start_season() } @@ -2131,6 +2131,9 @@ function start_season() { break } + if (game.year === 1759 && game.season === EARLY && !game.events.pitt) + place_amherst_forbes_and_wolfe_in_pool(false) + delete game.british.pass_fw delete game.british.pass_bh delete game.french.pass_fw @@ -8897,7 +8900,7 @@ events.william_pitt = { game.events.pitt = 1 game.state = 'william_pitt' game.count = 1 - place_amherst_forbes_and_wolfe_in_pool() + place_amherst_forbes_and_wolfe_in_pool(true) } } |