Fixed #452 - France's unique ability not working

This commit is contained in:
Yair Morgenstern
2019-02-16 23:52:26 +02:00
parent d581ca924f
commit 4c5753c41f
2 changed files with 12 additions and 4 deletions

View File

@ -105,6 +105,16 @@ class CityStats {
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 {
val stats = Stats()
@ -120,9 +130,6 @@ class CityStats {
&& currentConstruction is Building && currentConstruction.isWonder)
stats.production+=20
if(civUnique == "+2 Culture per turn from cities before discovering Steam Power")
stats.culture += 2
return stats
}
@ -306,6 +313,7 @@ class CityStats {
newBaseStatList["Trade routes"] = getStatsFromTradeRoute()
newBaseStatList["Buildings"] = cityInfo.cityConstructions.getStats()
newBaseStatList["Policies"] = getStatsFromPolicies(civInfo.policies.adoptedPolicies)
newBaseStatList["National ability"] = getStatsFromNationUnique()
val newStatPercentBonusList = LinkedHashMap<String,Stats>()
newStatPercentBonusList["Golden Age"]=getStatPercentBonusesFromGoldenAge(cityInfo.civInfo.goldenAges.isGoldenAge())

View File

@ -63,7 +63,7 @@ class LoadScreen : PickerScreen() {
val errorLabel = "".toLabel().setFontColor(Color.RED)
loadFromClipboardButton.onClick {
try{
val clipboardContentsString = Gdx.app.clipboard.contents
val clipboardContentsString = Gdx.app.clipboard.contents.trim()
val decoded = Gzip.unzip(clipboardContentsString)
val loadedGame = Json().fromJson(GameInfo::class.java, decoded)
loadedGame.setTransients()