diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-04-18 21:40:26 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | dfef3ea74ea73966a9685f8f2c72ef556a6acc58 (patch) | |
tree | 9685e5bdf0136d67b9831536c74de6929b1b135c /rules.js | |
parent | c47caec0057dce0466af20d84e02ffb9dcf6aa2c (diff) | |
download | andean-abyss-dfef3ea74ea73966a9685f8f2c72ef556a6acc58.tar.gz |
Fix FARC Zone placement.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -5,18 +5,15 @@ // TODO: optional place ambush // TODO: optional place rally -// TODO: check repeated alfonso +// TODO: log_br after free op/special -// TODO: Civic Action +// TODO: log Alfonso Cano +// TODO: log 1st division -// TODO: don't auto-end 7th sf remove terror/sabotage (no undo suprise) -// TODO: don't auto-end free Rally with elite backing (no undo suprise) +// TODO: Civic Action // TODO: if Assault and no valid assault targets, only allow air lift to enable Assault -// TODO: Government -> Govt -// TODO: Department -> Dept - // TODO: can_...operation - for space = ... check them all / can_rally - check that it is dept/city etc const AUTOMATIC = true @@ -1161,10 +1158,13 @@ function is_unsabotaged_pipeline(s) { // === MISC COMPOUND QUERIES == function is_possible_farc_zone(s) { - if (is_mountain(s) && !is_farc_zone(s)) { + let is_possible_space = is_dept + if (game.vm && game.vm.zona_de_convivencia) + is_possible_space = is_mountain + if (is_possible_space(s) && !is_farc_zone(s)) { let max = 0 for (let x = first_dept; x <= last_dept; ++x) { - if (is_mountain(x) && !is_farc_zone(x)) { + if (is_possible_space(x) && !is_farc_zone(x)) { let xn = count_pieces(x, FARC, BASE) + count_pieces(x, FARC, GUERRILLA) if (xn > max) max = xn @@ -6278,7 +6278,10 @@ function has_govt_in_farc_zone() { states.farc_zone_place = { prompt() { - view.prompt = "Place FARC Zone." + if (game.vm && game.vm.zona_de_convivencia) + view.prompt = "Place FARC Zone in a Mountain Department." + else + view.prompt = "Place FARC Zone." for (let s = first_dept; s <= last_dept; ++s) if (is_possible_farc_zone(s)) gen_action_space(s) @@ -8564,6 +8567,7 @@ CODE[35 * 2 + 1] = [ // EVENT 36 CODE[36 * 2 + 0] = [ [ vm_eligible, ()=>(game.current) ], + [ vm_asm, ()=>game.vm.zona_de_convivencia = 1 ], [ vm_asm, ()=>game.vm.save_current = game.current ], [ vm_current, GOVT ], [ vm_place_farc_zone ], |