summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js32
1 files changed, 30 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index d0fe31e..f114e8d 100644
--- a/rules.js
+++ b/rules.js
@@ -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 ],
]