mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Fix automated units not auto upgrading when enabled in options (#13434)
* fix automated ranged units not heading to enemy city * fix distance from city typo * Address points made in PR * priotirize tiles without retaliation * remove dangerous tiles logic * resolve review with alternative approach * faster exit if no sight * automated units auto upgrade if enabled * simplified condition
This commit is contained in:
parent
af377058ba
commit
a35de18455
@ -197,6 +197,9 @@ object UnitAutomation {
|
|||||||
unit.promotions.addPromotion(chosenPromotion.name)
|
unit.promotions.addPromotion(chosenPromotion.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AI upgrades units via UseGoldAutomation in NextTurnAutomation
|
||||||
|
if (unit.civ.isHuman() && tryUpgradeUnit(unit)) return
|
||||||
|
|
||||||
//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) || unit.hasUnique(UniqueType.FoundCity) ||
|
if ((unit.hasUnique(UniqueType.BuildImprovements) || unit.hasUnique(UniqueType.FoundCity) ||
|
||||||
unit.hasUnique(UniqueType.ReligiousUnit) || unit.hasUnique(UniqueType.CreateWaterImprovements))
|
unit.hasUnique(UniqueType.ReligiousUnit) || unit.hasUnique(UniqueType.CreateWaterImprovements))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user