diff options
-rw-r--r-- | events.txt | 6 | ||||
-rw-r--r-- | rules.js | 18 |
2 files changed, 19 insertions, 5 deletions
@@ -173,8 +173,10 @@ SHADED 8 current DS prompt `In each Province adjacent to Devagiri and/or Gulbarga, Govern for free ignoring location requirements and place a Troop.` asm game.vm.ignore_loc_req = true - space_opt all (is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && can_govern_in_space(s) - free_govern_in_space + space_opt all (is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && (can_govern_in_space(s) || can_place_piece(s, game.current, TROOPS)) + if (can_govern_in_space(game.vm.s)) + free_govern_in_space_skip + endif place_opt 1 DS TROOPS endspace @@ -1793,7 +1793,10 @@ states.govern_space = { function end_govern_space() { pop_summary() - game.state = "govern" + if (game.vm && game.cmd.limited) + end_command() + else + game.state = "govern" } /* REBEL COMMANDS */ @@ -5448,6 +5451,13 @@ function vm_free_govern_in_space() { goto_govern_space() } +function vm_free_govern_in_space_skip() { + init_free_command_in_space("Govern", game.vm.s) + push_summary() + game.cmd.count = [0, 0] + game.state = "govern_space" +} + function vm_govern_in_space() { init_free_command_in_space("Govern", game.vm.s) select_cmd_space(game.vm.s, 1) @@ -6179,8 +6189,10 @@ 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_space, true, 0, 999, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) || is_adjacent_to_city(C_GULBARGA, s)) && (can_govern_in_space(s) || can_place_piece(s, game.current, TROOPS)) ], + [ vm_if, ()=>(can_govern_in_space(game.vm.s)) ], + [ vm_free_govern_in_space_skip ], + [ vm_endif ], [ vm_place, false, 1, 1, DS, TROOPS ], [ vm_endspace ], [ vm_return ], |