mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Fixed : unit upgrades to itself with 10 gold.
This commit is contained in:
parent
3086520bd2
commit
11bb63495b
@ -229,6 +229,7 @@ class MapUnit {
|
||||
// if we don't remove the unit before the check it's return false!
|
||||
|
||||
val unitToUpgradeTo = getUnitToUpgradeTo()
|
||||
if (name == unitToUpgradeTo.name) return false
|
||||
civInfo.removeUnit(this)
|
||||
val canUpgrade = unitToUpgradeTo.isBuildable(civInfo)
|
||||
civInfo.addUnit(this)
|
||||
|
Loading…
x
Reference in New Issue
Block a user