diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-06 15:01:01 -0500 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-06 15:01:01 -0500 |
commit | 473b61c1dd1b0f79b13ef1aae506b496100a5e45 (patch) | |
tree | 6f46c586be4d516ab302755dcfe6eac101fcbe18 /rules.js | |
parent | 90fa7824bf4098675dbbc6d3233c8c5d41d67efd (diff) | |
download | vijayanagara-473b61c1dd1b0f79b13ef1aae506b496100a5e45.tar.gz |
Event 4.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 32 |
1 files changed, 30 insertions, 2 deletions
@@ -4354,6 +4354,29 @@ function vm_free_rally() { goto_rally_space() } +// VM: EVENT_4 + +function vm_event_4() { + game.state = "event_4" +} + +states.event_4 = { + prompt() { + event_prompt(`Obedient or Rebelling ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}.`) + + view.actions.obedient = 1 + view.actions.rebelling = 1 + }, + obedient() { + vm_next() + }, + rebelling() { + let p = find_piece(game.vm.s, game.current, ELITE) + to_rebel(p) + vm_next() + } +} + // VM: EVENT_25 function vm_event_25() { @@ -4387,7 +4410,6 @@ states.event_25 = { } - // === CONST === // Factions @@ -4522,7 +4544,13 @@ CODE[3 * 2 + 1] = [ // EVENT 4 CODE[4 * 2 + 0] = [ [ vm_current, REBEL_FACTIONS ], - [ vm_log, "NOT IMPLEMENTED" ], + [ vm_prompt, ()=>`Replace 1 Governor with an Obedient or Rebelling ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}.` ], + [ vm_piece, false, 1, 1, (p,s)=>is_governor(p) ], + [ vm_set_piece_space ], + [ vm_remove ], + [ vm_auto_place, false, 0, false, ()=>(game.current), ELITE ], + [ vm_event_4 ], + [ vm_endpiece ], [ vm_return ], ] |