mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fixed #452 - France's unique ability not working
This commit is contained in:
parent
d581ca924f
commit
4c5753c41f
@ -105,6 +105,16 @@ class CityStats {
|
|||||||
return stats
|
return stats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getStatsFromNationUnique(): Stats {
|
||||||
|
val stats = Stats()
|
||||||
|
|
||||||
|
val civUnique = cityInfo.civInfo.getNation().unique
|
||||||
|
if(civUnique == "+2 Culture per turn from cities before discovering Steam Power")
|
||||||
|
stats.culture += 2
|
||||||
|
|
||||||
|
return stats
|
||||||
|
}
|
||||||
|
|
||||||
private fun getStatPercentBonusesFromNationUnique(): Stats {
|
private fun getStatPercentBonusesFromNationUnique(): Stats {
|
||||||
val stats = Stats()
|
val stats = Stats()
|
||||||
|
|
||||||
@ -120,9 +130,6 @@ class CityStats {
|
|||||||
&& currentConstruction is Building && currentConstruction.isWonder)
|
&& currentConstruction is Building && currentConstruction.isWonder)
|
||||||
stats.production+=20
|
stats.production+=20
|
||||||
|
|
||||||
if(civUnique == "+2 Culture per turn from cities before discovering Steam Power")
|
|
||||||
stats.culture += 2
|
|
||||||
|
|
||||||
return stats
|
return stats
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +313,7 @@ class CityStats {
|
|||||||
newBaseStatList["Trade routes"] = getStatsFromTradeRoute()
|
newBaseStatList["Trade routes"] = getStatsFromTradeRoute()
|
||||||
newBaseStatList["Buildings"] = cityInfo.cityConstructions.getStats()
|
newBaseStatList["Buildings"] = cityInfo.cityConstructions.getStats()
|
||||||
newBaseStatList["Policies"] = getStatsFromPolicies(civInfo.policies.adoptedPolicies)
|
newBaseStatList["Policies"] = getStatsFromPolicies(civInfo.policies.adoptedPolicies)
|
||||||
|
newBaseStatList["National ability"] = getStatsFromNationUnique()
|
||||||
|
|
||||||
val newStatPercentBonusList = LinkedHashMap<String,Stats>()
|
val newStatPercentBonusList = LinkedHashMap<String,Stats>()
|
||||||
newStatPercentBonusList["Golden Age"]=getStatPercentBonusesFromGoldenAge(cityInfo.civInfo.goldenAges.isGoldenAge())
|
newStatPercentBonusList["Golden Age"]=getStatPercentBonusesFromGoldenAge(cityInfo.civInfo.goldenAges.isGoldenAge())
|
||||||
|
@ -63,7 +63,7 @@ class LoadScreen : PickerScreen() {
|
|||||||
val errorLabel = "".toLabel().setFontColor(Color.RED)
|
val errorLabel = "".toLabel().setFontColor(Color.RED)
|
||||||
loadFromClipboardButton.onClick {
|
loadFromClipboardButton.onClick {
|
||||||
try{
|
try{
|
||||||
val clipboardContentsString = Gdx.app.clipboard.contents
|
val clipboardContentsString = Gdx.app.clipboard.contents.trim()
|
||||||
val decoded = Gzip.unzip(clipboardContentsString)
|
val decoded = Gzip.unzip(clipboardContentsString)
|
||||||
val loadedGame = Json().fromJson(GameInfo::class.java, decoded)
|
val loadedGame = Json().fromJson(GameInfo::class.java, decoded)
|
||||||
loadedGame.setTransients()
|
loadedGame.setTransients()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user