summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js39
1 files changed, 36 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index cf363f5..8de4676 100644
--- a/rules.js
+++ b/rules.js
@@ -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 ],
]