Update CivInfoStats.kt

This commit is contained in:
Yair Morgenstern 2019-10-05 21:07:54 +03:00 committed by GitHub
parent e5732449b0
commit 2f849a57e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ class CivInfoStats(val civInfo: CivilizationInfo){
val statMap = HashMap<String, Float>()
statMap["Base happiness"] = civInfo.getDifficulty().baseHappiness.toFloat()
// TODO - happinessPerUnique should be difficulty-dependent, 5 on Settler and Chieftian and 4 on other difficulties (should be parameter, not in code)
var happinessPerUniqueLuxury = 4f + civInfo.getDifficulty().extraHappinessPerLuxury
if (civInfo.policies.isAdopted("Protectionism")) happinessPerUniqueLuxury += 1
statMap["Luxury resources"]= civInfo.getCivResources().map { it.resource }
@ -134,4 +135,4 @@ class CivInfoStats(val civInfo: CivilizationInfo){
return statMap
}
}
}