summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-17 17:37:51 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-17 17:37:51 +0200
commitdbdb79bfd888cc414c53f2f0640a4712dbb3da60 (patch)
tree68547dbbc963739e3d65d290bceee80345d12c4e /rules.js
parent8cd55a28c0b37f872eaffc52ddde8df4fc3df710 (diff)
downloadtime-of-crisis-dbdb79bfd888cc414c53f2f0640a4712dbb3da60.tar.gz
Fix Palmyra Allies bug.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/rules.js b/rules.js
index 77eebd4..0de30e6 100644
--- a/rules.js
+++ b/rules.js
@@ -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()
},