mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
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:
parent
180079f2b3
commit
546e57c971
@ -510,8 +510,6 @@ object NextTurnAutomation {
|
|||||||
if (civInfo.cities.none()) return
|
if (civInfo.cities.none()) return
|
||||||
if (civInfo.getHappiness() <= civInfo.cities.size) 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
|
// 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 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
|
||||||
|
@ -33,9 +33,8 @@ object CivilianUnitAutomation {
|
|||||||
|
|
||||||
val hasSettlerUnique = hasSettlerAction(UniqueType.FoundCity) || hasSettlerAction(UniqueType.FoundPuppetCity)
|
val hasSettlerUnique = hasSettlerAction(UniqueType.FoundCity) || hasSettlerAction(UniqueType.FoundPuppetCity)
|
||||||
/*
|
/*
|
||||||
* allow citystate to build unit Military
|
* allow citystate to build unit Military,
|
||||||
* that can settle but stop them from settling that unit
|
* that can settle but stop them from settling that unit.
|
||||||
*
|
|
||||||
* */
|
* */
|
||||||
if (hasSettlerUnique && !(unit.civ.isCityState && unit.isMilitary()))
|
if (hasSettlerUnique && !(unit.civ.isCityState && unit.isMilitary()))
|
||||||
return SpecificUnitAutomation.automateSettlerActions(unit, dangerousTiles)
|
return SpecificUnitAutomation.automateSettlerActions(unit, dangerousTiles)
|
||||||
|
@ -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
|
//This allows for military units with certain civilian abilities to behave as civilians in peace and soldiers in war
|
||||||
if ((unit.hasUnique(UniqueType.BuildImprovements) ||
|
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.hasUnique(UniqueType.ReligiousUnit) || unit.hasUnique(UniqueType.CreateWaterImprovements))
|
||||||
&& !unit.civ.isAtWar()){
|
&& !unit.civ.isAtWar()){
|
||||||
CivilianUnitAutomation.automateCivilianUnit(unit, getDangerousTiles(unit))
|
CivilianUnitAutomation.automateCivilianUnit(unit, getDangerousTiles(unit))
|
||||||
|
@ -146,8 +146,7 @@ object BattleUnitCapture {
|
|||||||
wasDestroyedInstead = true
|
wasDestroyedInstead = true
|
||||||
}
|
}
|
||||||
// City states can never capture settlers at all
|
// City states can never capture settlers at all
|
||||||
(capturedUnit.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals) ||
|
capturedUnit.hasUnique(UniqueType.FoundCity, GameContext.IgnoreConditionals) -> {
|
||||||
capturedUnit.hasUnique(UniqueType.FoundPuppetCity, GameContext.IgnoreConditionals)) && attacker.getCivInfo().isCityState -> {
|
|
||||||
capturedUnit.destroy()
|
capturedUnit.destroy()
|
||||||
wasDestroyedInstead = true
|
wasDestroyedInstead = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user