diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-20 10:58:09 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-20 10:58:09 +0200 |
commit | f3208300257858d18fee0dcf13e0a16a2bc29d7f (patch) | |
tree | 58cb36ad4aeacc12145b2bab7d106fa8a6c4692b /rules.js | |
parent | 8da79606f2db817aba5775dbb511837c92e87023 (diff) | |
download | algeria-f3208300257858d18fee0dcf13e0a16a2bc29d7f.tar.gz |
more deterministic independence
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 45 |
1 files changed, 29 insertions, 16 deletions
@@ -1186,9 +1186,7 @@ exports.setup = function (seed, scenario, options) { game.slow_french_reaction = true } if (options.more_deterministic_independence) { - // TODO log("More Deterministic Independence.") - log("NOT IMPLEMENTED") game.more_deterministic_independence = true } } @@ -1624,6 +1622,18 @@ function goto_random_event() { delete game.events.gov_return log_br() } + + // Instead of waiting for a random event to make Morocco and Tunisia independent, + // assume that this will happen some time in the first 6 turns of the 1954 scenario. + // Each Random Events Phase, roll 1d6; if the number rolled is less than or equal to the number of the current turn, + //the two countries immediately become independent. + if (game.more_deterministic_independence && !game.is_morocco_tunisia_independent) { + log("More Deterministic Independence?") + let roll = roll_1d6() + if (roll <= game.turn) + grant_morocco_tunisia_independence() + log_br() + } } states.random_event = { @@ -1639,7 +1649,7 @@ states.random_event = { }, roll() { let rnd = 10 * roll_d6() + roll_d6() - log(">Rolled " + rnd) + log("Rolled " + rnd) if (rnd <= 26) { goto_no_event() @@ -1818,15 +1828,28 @@ states.event_fln_factional_purge_select_units = { } } -function goto_morocco_tunisia_independence() { +function grant_morocco_tunisia_independence() { log_h3("Morocco & Tunisia Gains Independence.") log_br() + // Raise both FLN and Government PSL by 2d6; + let fln_roll = roll_nd6(2) + raise_fln_psl(fln_roll) + let gov_roll = roll_nd6(2) + raise_gov_psl(gov_roll) + + // FLN player may now Build/Convert units in these two countries as if a Front were there + // and Government may begin to mobilize the Border Zone. See 11.22. + game.is_morocco_tunisia_independent = true + ensure_front_in_independent_morocco_tunisia() +} + +function goto_morocco_tunisia_independence() { if (game.is_morocco_tunisia_independent || game.scenario === "1958" || game.scenario === "1960") { // If this event is rolled again, or if playing the 1958 or 1960 scenarios, // FLN player instead rolls on the Mission Success Table (no DRM) and gets that number of AP // (represents infiltration of small numbers of weapons and troops through the borders). - log("Infiltration through borders.") + log_h3("Infiltration through borders.") let [result, _effect] = roll_mst() if (result) raise_fln_ap(result) @@ -1835,17 +1858,7 @@ function goto_morocco_tunisia_independence() { return } - // Raise both FLN and Government PSL by 2d6; - let fln_roll = roll_nd6(2) - raise_fln_psl(fln_roll) - - let gov_roll = roll_nd6(2) - raise_gov_psl(gov_roll) - - // FLN player may now Build/Convert units in these two countries as if a Front were there - // and Government may begin to mobilize the Border Zone. See 11.22. - game.is_morocco_tunisia_independent = true - ensure_front_in_independent_morocco_tunisia() + grant_morocco_tunisia_independence() end_random_event() } |