summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-04-18 07:11:28 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-04-18 07:11:28 -0400
commit0dfadb71724d007a1345992c79caf38f87abc5f6 (patch)
tree035393ef59212ab58feb78e13a8f657b3c596ef5
parentb6ce67cf71142bfe04b25f11b3958001425b0c37 (diff)
downloadvijayanagara-0dfadb71724d007a1345992c79caf38f87abc5f6.tar.gz
Fix Event 8 not enough troops
-rw-r--r--events.txt6
-rw-r--r--rules.js4
2 files changed, 7 insertions, 3 deletions
diff --git a/events.txt b/events.txt
index 151d4f4..f4e5e16 100644
--- a/events.txt
+++ b/events.txt
@@ -173,11 +173,13 @@ 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) || can_place_piece(s, game.current, TROOPS))
+ 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, DS, TROOPS))
if (can_govern_in_space(game.vm.s))
free_govern_in_space_skip
endif
- place_opt 1 DS TROOPS
+ if (can_place_piece(game.vm.s, DS, TROOPS))
+ place_opt 1 DS TROOPS
+ endif
endspace
EVENT 9
diff --git a/rules.js b/rules.js
index 1d776a0..0bfc416 100644
--- a/rules.js
+++ b/rules.js
@@ -6189,11 +6189,13 @@ 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) || can_place_piece(s, game.current, TROOPS)) ],
+ [ 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, DS, TROOPS)) ],
[ vm_if, ()=>(can_govern_in_space(game.vm.s)) ],
[ vm_free_govern_in_space_skip ],
[ vm_endif ],
+ [ vm_if, ()=>(can_place_piece(game.vm.s, DS, TROOPS)) ],
[ vm_place, false, 1, 1, DS, TROOPS ],
+ [ vm_endif ],
[ vm_endspace ],
[ vm_return ],
]