mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-21 20:18:28 +07:00
Fixed null reference error related to nuking (#10408)
This commit is contained in:
parent
11108112b5
commit
25aed40686
@ -127,10 +127,10 @@ object AirUnitAutomation {
|
||||
val tileExplosionValue = if (targetTile == tile) 80 else 50
|
||||
|
||||
if (targetUnit.isMilitary()) {
|
||||
explosionValue += if (targetTile == tile) evaluateCivValue(targetTile.militaryUnit?.civ!!, -200, tileExplosionValue)
|
||||
else evaluateCivValue(targetTile.militaryUnit?.civ!!, -150, 50)
|
||||
explosionValue += if (targetTile == tile) evaluateCivValue(targetUnit.civ, -200, tileExplosionValue)
|
||||
else evaluateCivValue(targetUnit.civ, -150, 50)
|
||||
} else if (targetUnit.isCivilian()) {
|
||||
explosionValue += evaluateCivValue(targetTile.civilianUnit?.civ!!, -100, tileExplosionValue / 2)
|
||||
explosionValue += evaluateCivValue(targetUnit.civ, -100, tileExplosionValue / 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user