diff options
-rw-r--r-- | events.txt | 3 | ||||
-rw-r--r-- | rules.js | 7 |
2 files changed, 5 insertions, 5 deletions
@@ -500,10 +500,11 @@ SHADED 22 EVENT 23 current VE - prompt "Build and then replace a Unit with a Raja in each Province with a Temple." add_influence VE + prompt "Build and then replace a Unit with a Raja in each Province with a Temple." space_opt 1 can_build_in_space(s) free_build + log_br endspace prompt "In each Province with a Temple, replace a Unit with a Raja." space_opt all has_temple(s) && has_units_enemy_faction(s) @@ -2900,10 +2900,8 @@ function has_unmoved_piece(space, faction) { function has_valid_attackers(s, faction) { let valid_attacker = false - console.log(game.decree) - console.log(game.cmd) for_each_movable(faction, p => { - if (piece_space(p) === s && !set_has(game.cmd.pieces, p)) + if (piece_space(p) === s && (!game.cmd || !set_has(game.cmd.pieces, p))) valid_attacker = true if (piece_space(p) === s || (has_piece(piece_space(p), faction, DISC) && SPACES[s].adjacent.includes(piece_space(p)))) if (!game.cmd.pieces || game.cmd.pieces.length === 0) @@ -6303,10 +6301,11 @@ CODE[22 * 2 + 1] = [ // EVENT 23 CODE[23 * 2 + 0] = [ [ vm_current, VE ], - [ vm_prompt, "Build and then replace a Unit with a Raja in each Province with a Temple." ], [ vm_add_influence, VE ], + [ vm_prompt, "Build and then replace a Unit with a Raja in each Province with a Temple." ], [ vm_space, true, 0, 1, (s)=>can_build_in_space(s) ], [ vm_free_build ], + [ vm_log_br ], [ vm_endspace ], [ vm_prompt, "In each Province with a Temple, replace a Unit with a Raja." ], [ vm_space, true, 0, 999, (s)=>has_temple(s) && has_units_enemy_faction(s) ], |