From b17f162be9fcd7faa08617744edff8ad9ab726e7 Mon Sep 17 00:00:00 2001 From: SpacedOutChicken <58439827+SpacedOutChicken@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:38:22 -0700 Subject: [PATCH] Allow Barbarians to make set-up ranged units (#11173) Allow Barbarians to create units that must set up to ranged attack, unless specifically forbidden by the relevant unique Since we have a unique for this explicit purpose, we no longer need this extra prevention for Barbarian unit types. --- .../unciv/logic/automation/civilization/BarbarianManager.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt b/core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt index 92c260ca17..dd67f31def 100644 --- a/core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt +++ b/core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt @@ -258,8 +258,7 @@ class Encampment() : IsPartOfGameInfoSerialization { barbarianCiv.tech.techsResearched = allResearchedTechs.toHashSet() val unitList = gameInfo.ruleset.units.values .filter { it.isMilitary() && - !(it.hasUnique(UniqueType.MustSetUp) || - it.hasUnique(UniqueType.CannotAttack) || + !(it.hasUnique(UniqueType.CannotAttack) || it.hasUnique(UniqueType.CannotBeBarbarian)) && (if (naval) it.isWaterUnit() else it.isLandUnit()) && it.isBuildable(barbarianCiv) }