From fe4496b9ec50ba1e2302d4e795d905103fe3dcce Mon Sep 17 00:00:00 2001 From: Joël Simoneau Date: Thu, 3 Apr 2025 14:18:57 -0400 Subject: Missing Amir for Shaded 15 --- events.txt | 2 +- rules.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/events.txt b/events.txt index 1ed1796..b4ff4ef 100644 --- a/events.txt +++ b/events.txt @@ -343,7 +343,7 @@ EVENT 15 SHADED 15 stay_eligible prompt "Replace an Amir with a Governor and place a Tributary marker in a Province adjacent to Devagiri." - space 1 is_adjacent_to_city(C_DEVAGIRI, s) && !is_tributary(s) + space 1 (is_adjacent_to_city(C_DEVAGIRI, s) && !is_tributary(s) && has_amir(s)) asm game.vm.p = find_piece(game.vm.s, BK, ELITE) replace DS ELITE place_tributary diff --git a/rules.js b/rules.js index ebef8cc..c1b366e 100644 --- a/rules.js +++ b/rules.js @@ -3121,9 +3121,8 @@ function piece_type(p) { throw "IMPOSSIBLE - piece_type" } -function has_governor(s) { - return has_piece(s, DS, ELITE) -} +function has_governor(s) { return has_piece(s, DS, ELITE) } +function has_amir(s) { return has_piece(s, BK, ELITE) } function has_fort(s) { return has_piece(s, BK, DISC) } function has_qasbah(s) { return has_piece(s, DS, DISC) } @@ -6253,7 +6252,7 @@ CODE[15 * 2 + 0] = [ CODE[15 * 2 + 1] = [ [ vm_stay_eligible ], [ vm_prompt, "Replace an Amir with a Governor and place a Tributary marker in a Province adjacent to Devagiri." ], - [ vm_space, true, 1, 1, (s)=>is_adjacent_to_city(C_DEVAGIRI, s) && !is_tributary(s) ], + [ vm_space, true, 1, 1, (s)=>(is_adjacent_to_city(C_DEVAGIRI, s) && !is_tributary(s) && has_amir(s)) ], [ vm_asm, ()=>game.vm.p = find_piece(game.vm.s, BK, ELITE) ], [ vm_replace, DS, ELITE, false, false ], [ vm_place_tributary ], -- cgit v1.2.3