diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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) ], |