summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index 4ace71c..84cc7f5 100644
--- a/rules.js
+++ b/rules.js
@@ -3546,8 +3546,11 @@ function can_foederati_from_region(where) {
for (let tribe = 0; tribe < tribe_count; ++tribe) {
if (find_active_non_leader_barbarian_of_tribe(where, tribe) >= 0)
return true
- if (find_inactive_non_leader_barbarian_of_tribe(where, tribe) >= 0)
- return true
+ if (is_classic()) {
+ // v3: only active barbarians
+ if (find_inactive_non_leader_barbarian_of_tribe(where, tribe) >= 0)
+ return true
+ }
}
return false
}
@@ -3558,9 +3561,12 @@ function gen_foederati(where) {
let id = find_active_non_leader_barbarian_of_tribe(where, tribe)
if (id >= 0)
gen_action_barbarian(id)
- id = find_inactive_non_leader_barbarian_of_tribe(where, tribe)
- if (id >= 0)
- gen_action_barbarian(id)
+ if (is_classic()) {
+ // v3: only active barbarians
+ id = find_inactive_non_leader_barbarian_of_tribe(where, tribe)
+ if (id >= 0)
+ gen_action_barbarian(id)
+ }
}
}
@@ -3577,8 +3583,8 @@ function can_play_foederati_v1() {
return false
}
-function can_play_foederati_v2() {
- // v2: only Roman provinces and not adjacent
+function can_play_foederati_v3() {
+ // v3: only active barbarians and not adjacent
for (let i = 0; i < 6; ++i) {
let id = game.current * 6 + i
let where = get_general_location(id)
@@ -3595,7 +3601,7 @@ function can_play_foederati() {
if (is_classic())
return can_play_foederati_v1()
else
- return can_play_foederati_v2()
+ return can_play_foederati_v3()
}
function play_foederati() {
@@ -3617,9 +3623,9 @@ states.foederati = {
if (is_province(where) && has_lone_militia(where) && can_foederati_from_region_or_adjacent(where))
gen_action_militia(where)
} else {
- // v2: only Roman province and not adjacent
+ // v3: only active barbarians and not adjacent
let where = get_general_location(id)
- if (is_province(where) && can_foederati_from_region(where))
+ if (is_region(where) && can_foederati_from_region(where))
gen_action_general(id)
where = get_governor_location(id)
if (is_province(where) && has_lone_militia(where) && can_foederati_from_region(where))