diff --git a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt index 53077ca7c9..3f4b833ceb 100644 --- a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt @@ -511,10 +511,12 @@ object NextTurnAutomation { if (civInfo.isAtWar()) return // don't train settlers when you could be training troops. if (civInfo.cities.none()) return if (civInfo.getHappiness() <= civInfo.cities.size) return + + // This is a tough one - if we don't ignore conditionals we could have units that can found only on certain tiles that are ignored // If we DO ignore conditionals we could get a unit that can only found if there's a certain tech, or something - if (civInfo.units.getCivUnits().any { it.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals) }) return + if (civInfo.units.getCivUnits().any { it.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals)}) return if (civInfo.cities.any { val currentConstruction = it.cityConstructions.getCurrentConstruction() currentConstruction is BaseUnit && currentConstruction.isCityFounder() diff --git a/core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt b/core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt index 9a0f7e8e60..66c6bb3425 100644 --- a/core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt @@ -32,7 +32,12 @@ object CivilianUnitAutomation { .any { canUse(unit, it) } val hasSettlerUnique = hasSettlerAction(UniqueType.FoundCity) || hasSettlerAction(UniqueType.FoundPuppetCity) - if (hasSettlerUnique) + /* + * allow citystate to build unit Military + * that can settle but stop them from settling that unit + * + * */ + if (hasSettlerUnique && !(unit.civ.isCityState && unit.isMilitary())) return SpecificUnitAutomation.automateSettlerActions(unit, dangerousTiles) if (tryRunAwayIfNeccessary(unit)) return