diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-18 16:21:31 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-03-18 16:21:31 -0400 |
commit | e2b4cc4ffd06d39c007be923a3a88edfcabf23f6 (patch) | |
tree | ae6f12d4514f1d1a3ca27d91c4ffacab1816a504 | |
parent | 50446af454b1c2f86174bdddf0a90cdccf0a0c7f (diff) | |
download | vijayanagara-e2b4cc4ffd06d39c007be923a3a88edfcabf23f6.tar.gz |
Obedient ending
-rw-r--r-- | rules.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -4567,6 +4567,7 @@ function goto_rebel_or_obedient(s) { } states.rebel_or_obedient = { + inactive: "Obedient or Rebelling units", prompt() { event_prompt(`Obedient or Rebelling ${PIECE_FACTION_TYPE_NAME[game.current][ELITE]}.`) @@ -4575,20 +4576,24 @@ states.rebel_or_obedient = { }, obedient() { push_undo() - vm_next() + end_rebel_or_obedient() }, rebelling() { push_undo() let p = find_piece(game.decree.where, game.current, ELITE) to_rebel(p) log(`A ${piece_name(p)} in S${game.decree.where} to Rebel.`) - if (game.vm) - vm_next() - else - game.state = "conspire" + end_rebel_or_obedient() } } +function end_rebel_or_obedient() { + if (game.vm && game.vm.ip) + vm_next() + else + game.state = "conspire" +} + // VM: GAIN_CAVALRY function vm_gain_cavalry() { |