diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-03-19 21:01:58 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | ad863219484ad675d138e0863880bf798060b493 (patch) | |
tree | 5c9334a4bd3005a7c51ecea59db501451e7a569b | |
parent | 8f4ba18fc3c60fed53a5d230662adfb33134c620 (diff) | |
download | andean-abyss-ad863219484ad675d138e0863880bf798060b493.tar.gz |
Save/restore current faction for some events.
-rw-r--r-- | events.txt | 3 | ||||
-rw-r--r-- | rules.js | 12 |
2 files changed, 13 insertions, 2 deletions
@@ -426,9 +426,10 @@ SHADED 35 EVENT 36 eligible (game.current) + save_current current GOVT place_farc_zone - # TODO: current (executing_faction()) + restore_current prompt Shift adjacent spaces toward Active Support. space 2 is_pop(s) && !is_active_support(s) && is_adjacent(game.vm.farc_zone, s) shift_support @@ -5609,10 +5609,20 @@ function vm_current() { vm_next() } +function vm_save_current() { + game.vm.faction = game.current + vm_next() +} + +function vm_restore_current() { + game.current = game.vm.faction + vm_next() +} + states.vm_current = { prompt() { let list = vm_operand(1) - event_prompt("Select Faction to execute Event.") + event_prompt("Select Faction.") if (list === GOVT || (Array.isArray(list) && list.includes(GOVT))) view.actions.govt = 1 if (list === FARC || (Array.isArray(list) && list.includes(FARC))) |