mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
Update NextTurnAutomation.kt (#13667)
This commit is contained in:
parent
8283c0efc3
commit
368bf8c84d
@ -443,7 +443,8 @@ object NextTurnAutomation {
|
||||
/** Returns the priority of the unit, a lower value is higher priority **/
|
||||
fun getUnitPriority(unit: MapUnit, isAtWar: Boolean): Int {
|
||||
if (unit.hasUnique(UniqueType.SpaceshipPart)) return 0 // Move before everything else so we can swap
|
||||
if (unit.isCivilian() && !unit.isGreatPersonOfType("War")) return 1 // Civilian
|
||||
if (unit.isCivilian() && unit.hasUnique(UniqueType.FoundCity)) return 1// Settlers before workers
|
||||
if (unit.isCivilian() && !unit.isGreatPersonOfType("War")) return 2 // Civilian
|
||||
if (unit.baseUnit.isAirUnit()) return when {
|
||||
unit.canIntercept() -> 2 // Fighers first
|
||||
unit.isNuclearWeapon() -> 3 // Then Nukes (area damage)
|
||||
|
Loading…
x
Reference in New Issue
Block a user