diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-17 17:37:51 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-17 17:37:51 +0200 |
commit | dbdb79bfd888cc414c53f2f0640a4712dbb3da60 (patch) | |
tree | 68547dbbc963739e3d65d290bceee80345d12c4e | |
parent | 8cd55a28c0b37f872eaffc52ddde8df4fc3df710 (diff) | |
download | time-of-crisis-dbdb79bfd888cc414c53f2f0640a4712dbb3da60.tar.gz |
Fix Palmyra Allies bug.
-rw-r--r-- | rules.js | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1629,9 +1629,11 @@ function goto_palmyra_allies() { function resume_palmyra_allies() { if ( - (find_active_barbarian_of_tribe(SASSANIDS, GALATIA) >= 0) || - (find_active_barbarian_of_tribe(SASSANIDS, SYRIA) >= 0) || - (find_active_barbarian_of_tribe(SASSANIDS, SASSANIDS_HOMELAND) >= 0) + game.count > 0 && ( + find_active_barbarian_of_tribe(GALATIA, SASSANIDS) >= 0 || + find_active_barbarian_of_tribe(SYRIA, SASSANIDS) >= 0 || + find_active_barbarian_of_tribe(SASSANIDS_HOMELAND, SASSANIDS) >= 0 + ) ) game.state = "palmyra_allies" else @@ -1653,23 +1655,21 @@ states.palmyra_allies = { if (where === GALATIA || where === SYRIA || where === SASSANIDS_HOMELAND) gen_action_barbarian(ARDASHIR) - id = find_active_non_leader_barbarian_of_tribe(SASSANIDS, GALATIA) + id = find_active_non_leader_barbarian_of_tribe(GALATIA, SASSANIDS) if (id >= 0) gen_action_barbarian(id) - id = find_active_non_leader_barbarian_of_tribe(SASSANIDS, SYRIA) + id = find_active_non_leader_barbarian_of_tribe(SYRIA, SASSANIDS) if (id >= 0) gen_action_barbarian(id) - id = find_active_non_leader_barbarian_of_tribe(SASSANIDS, SASSANIDS_HOMELAND) + id = find_active_non_leader_barbarian_of_tribe(SASSANIDS_HOMELAND, SASSANIDS) if (id >= 0) gen_action_barbarian(id) }, barbarian(id) { push_undo() eliminate_barbarian(id) - if (--game.count === 0) - goto_take_actions() - else - resume_palmyra_allies() + game.count -- + resume_palmyra_allies() }, } @@ -4817,7 +4817,7 @@ states.support_check_mobs = { }, region(where) { push_undo() - log("More mobs than support in %" + where + ".") + log("Too many mobs in %" + where + ".") remove_governor(where, true) goto_support_check_mobs() }, |