Removed most of the FoundPuppetCity changes for another PR down the line.

The only FoundPuppetCity changes I didn't remove is the one in CivilianUnitAutomation.kt.
Because that one is mostly a bug fix to stop the citystate from settle puppet cities.
This commit is contained in:
Emandac 2025-09-13 23:44:25 +02:00
parent 180079f2b3
commit 546e57c971
4 changed files with 4 additions and 8 deletions

View File

@ -509,8 +509,6 @@ 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

View File

@ -33,9 +33,8 @@ object CivilianUnitAutomation {
val hasSettlerUnique = hasSettlerAction(UniqueType.FoundCity) || hasSettlerAction(UniqueType.FoundPuppetCity)
/*
* allow citystate to build unit Military
* that can settle but stop them from settling that unit
*
* 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)

View File

@ -68,7 +68,7 @@ object UnitAutomation {
//This allows for military units with certain civilian abilities to behave as civilians in peace and soldiers in war
if ((unit.hasUnique(UniqueType.BuildImprovements) ||
unit.hasUnique(UniqueType.FoundCity) || unit.hasUnique(UniqueType.FoundPuppetCity) ||
unit.hasUnique(UniqueType.FoundCity) ||
unit.hasUnique(UniqueType.ReligiousUnit) || unit.hasUnique(UniqueType.CreateWaterImprovements))
&& !unit.civ.isAtWar()){
CivilianUnitAutomation.automateCivilianUnit(unit, getDangerousTiles(unit))

View File

@ -146,8 +146,7 @@ object BattleUnitCapture {
wasDestroyedInstead = true
}
// City states can never capture settlers at all
(capturedUnit.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals) ||
capturedUnit.hasUnique(UniqueType.FoundPuppetCity, GameContext.IgnoreConditionals)) && attacker.getCivInfo().isCityState -> {
capturedUnit.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals) -> {
capturedUnit.destroy()
wasDestroyedInstead = true
}