mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
Resolved #1405 - upgrading Spearman to Landsknecht no longer gives you gold
This commit is contained in:
parent
650ac66ff6
commit
7a9fd14b13
@ -326,6 +326,7 @@ class CityInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isPuppet=false
|
isPuppet=false
|
||||||
|
cityConstructions.inProgressConstructions.clear() // undo all progress of the previous civ on units etc.
|
||||||
cityStats.update()
|
cityStats.update()
|
||||||
UncivGame.Current.worldScreen.shouldUpdate=true
|
UncivGame.Current.worldScreen.shouldUpdate=true
|
||||||
}
|
}
|
||||||
|
@ -238,6 +238,7 @@ class MapUnit {
|
|||||||
goldCostOfUpgrade = (goldCostOfUpgrade * 0.66f).toInt()
|
goldCostOfUpgrade = (goldCostOfUpgrade * 0.66f).toInt()
|
||||||
if(civInfo.containsBuildingUnique("Gold cost of upgrading military units reduced by 33%"))
|
if(civInfo.containsBuildingUnique("Gold cost of upgrading military units reduced by 33%"))
|
||||||
goldCostOfUpgrade = (goldCostOfUpgrade * 0.66f).toInt()
|
goldCostOfUpgrade = (goldCostOfUpgrade * 0.66f).toInt()
|
||||||
|
if(goldCostOfUpgrade<0) return 0 // For instance, Landsknecht costs less than Spearman, so upgrading would cost negative gold
|
||||||
return goldCostOfUpgrade
|
return goldCostOfUpgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user