diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-09 12:11:27 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-09 12:11:27 -0400 |
commit | f8fa52913ef4620306be050714c259296bbb887d (patch) | |
tree | 9578ee5081e2a720133fa9b9eb26a4821e0904d1 /rules.js | |
parent | 01dfeaf0e26d6c46e8d727a6db4e9985059749b8 (diff) | |
download | vijayanagara-f8fa52913ef4620306be050714c259296bbb887d.tar.gz |
Event 13.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 39 |
1 files changed, 36 insertions, 3 deletions
@@ -4383,7 +4383,14 @@ function vm_free_attack() { init_free_command("Attack", game.vm.s) game.cmd.attacker = game.current game.cmd.support_space = null - goto_attack_select() + + if (typeof vm_inst(1) !== "undefined") { + game.cmd.selected = [] + game.cmd.target = vm_inst(1) + goto_attack_space() + } else { + goto_attack_select() + } } // VM: BUILD @@ -4907,13 +4914,39 @@ CODE[12 * 2 + 1] = [ // EVENT 13 CODE[13 * 2 + 0] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_add_influence, VE ], + [ vm_add_influence, VE ], + [ vm_add_influence, VE ], + [ vm_current, VE ], + [ vm_asm, ()=>game.vm.count = (Math.min((4 - game.inf[VE]), 2) * 2) ], + [ vm_add_influence, VE ], + [ vm_add_influence, VE ], + [ vm_asm, ()=>game.vm.placed = 0 ], + [ vm_repeat, ()=>(game.vm.count) ], + [ vm_prompt, ()=>`Place up to ${game.vm.count-game.vm.placed} Rajas adjacent to Vijayanagara.` ], + [ vm_space, true, 0, 1, (s)=>is_adjacent_to_city(C_VIJAYANAGARA, s) && can_place_piece(s, VE, ELITE) ], + [ vm_auto_place, false, 0, false, VE, ELITE ], + [ vm_asm, ()=>(game.vm.placed += 1) ], + [ vm_endspace ], + [ vm_endrepeat ], [ vm_return ], ] // SHADED 13 CODE[13 * 2 + 1] = [ - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_prompt, "Select a Province with Rajas adjacent to a Province with a Bahmani piece." ], + [ vm_space, true, 1, 1, (s)=>(has_piece(s, VE, ELITE) && SPACES[s].adjacent.some(ss => has_piece_faction(ss, BK))) ], + [ vm_mark_space ], + [ vm_endspace ], + [ vm_prompt, "Select a destination Province for the Rajas." ], + [ vm_space, true, 1, 1, (s)=>(is_adjacent(s, game.vm.m) && has_piece_faction(s, BK)) ], + [ vm_prompt, "Move any Rajas to the adjacent Province." ], + [ vm_piece, false, 999, 999, (p,s)=>(is_raja(p) && (piece_space(p) === game.vm.m[0])) ], + [ vm_move ], + [ vm_endpiece ], + [ vm_prompt, "Make a free Attack against the Vijayanagara Empire there." ], + [ vm_free_attack, VE ], + [ vm_endspace ], [ vm_return ], ] |