Fix scout not upgrading through ruins (#7091)

This commit is contained in:
OptimizedForDensity 2022-06-08 03:19:42 -04:00 committed by GitHub
parent 006d360feb
commit 207cba0844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,7 +370,7 @@ object UnitActions {
isFree: Boolean,
isSpecial: Boolean
): UnitAction? {
if (unit.baseUnit().upgradesTo == null) return null
if (unit.baseUnit().upgradesTo == null && unit.baseUnit().specialUpgradesTo == null) return null // can't upgrade to anything
val unitTile = unit.getTile()
val civInfo = unit.civInfo
if (!isFree && unitTile.getOwner() != civInfo) return null