diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-10 10:20:19 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-10 10:20:19 -0400 |
commit | 2b1d488ddede1e27f11d055e30ef399e392bafe8 (patch) | |
tree | ccead59b16e423a79fe51cc5e2667f29fd2ae1a0 /rules.js | |
parent | 0e0180cf6a0552088dead19de67b090f40b974a3 (diff) | |
download | vijayanagara-2b1d488ddede1e27f11d055e30ef399e392bafe8.tar.gz |
Better Govern Events
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1667,9 +1667,9 @@ function can_govern() { } function can_govern_in_space(s) { - let is_event_4 = (game.vm && game.vm.fp === 9) + let is_space_agnostic = (game.vm && "ignore_loc_req" in game.vm && game.vm.ignore_loc_req) let is_space = (is_tributary(s) || s === S_DELHI || s === S_MOUNTAIN_PASSES || s === S_PUNJAB || is_faction_control(s, DS)) - if (!is_event_4 && !is_space) + if (!is_space_agnostic && !is_space) return false if (has_piece(AVAILABLE, DS, ELITE)) @@ -1706,8 +1706,8 @@ function goto_govern_space() { states.govern = { inactive: "Govern", prompt() { - if (game.vm && game.vm.fp === 9) - view.prompt = "Govern: Ignore Locations requirements." + if (game.vm && "ignore_loc_req" in game.vm && game.vm.ignore_loc_req) + view.prompt = "Govern: Ignore locations requirements." else view.prompt = "Govern: Select a Tributary, Controlled, Mongol Invader region or Delhi." @@ -6032,6 +6032,7 @@ CODE[4 * 2 + 1] = [ [ vm_stay_eligible ], [ vm_current, DS ], [ vm_prompt, "Govern ignoring location requirements." ], + [ vm_asm, ()=>game.vm.ignore_loc_req = true ], [ vm_govern ], [ vm_return ], ] @@ -6131,6 +6132,7 @@ CODE[8 * 2 + 0] = [ CODE[8 * 2 + 1] = [ [ vm_current, DS ], [ vm_prompt, ()=>`In each Province adjacent to Devagiri and/or Gulbarga, Govern for free ignoring location requirements and place a Troop.` ], + [ vm_asm, ()=>game.vm.ignore_loc_req = true ], [ vm_space, true, 0, 999, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) ], [ vm_free_govern_in_space ], [ vm_place, false, 1, 1, DS, TROOPS ], |