mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Stats per Stat unique (#10591)
* Added Stats per Stat unique * Applied the suggestions of @yairm210
This commit is contained in:
parent
199b3ada93
commit
6617504c05
@ -311,6 +311,11 @@ class CivInfoStatsForNextTurn(val civInfo: Civilization) {
|
||||
if (unique.sourceObjectType != UniqueTarget.Building && unique.sourceObjectType != UniqueTarget.Wonder)
|
||||
statMap.add(unique.sourceObjectType!!.name, unique.stats)
|
||||
|
||||
for (unique in civInfo.getMatchingUniques(UniqueType.StatsPerStat)) {
|
||||
val amount = civInfo.getStatReserve(Stat.valueOf(unique.params[2])) / unique.params[1].toInt()
|
||||
statMap.add("Stats", unique.stats.times(amount))
|
||||
}
|
||||
|
||||
val statsPerNaturalWonder = Stats(happiness = 1f)
|
||||
|
||||
for (unique in civInfo.getMatchingUniques(UniqueType.StatsFromNaturalWonders))
|
||||
|
@ -28,7 +28,7 @@ enum class UniqueType(
|
||||
StatsFromSpecialist("[stats] from every specialist [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
StatsPerPopulation("[stats] per [amount] population [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
StatsPerPolicies("[stats] per [amount] social policies adopted", UniqueTarget.Global),
|
||||
|
||||
StatsPerStat("[stats] per every [amount] [civWideStat]", UniqueTarget.Global),
|
||||
|
||||
StatsFromCitiesOnSpecificTiles("[stats] in cities on [terrainFilter] tiles", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
StatsFromBuildings("[stats] from all [buildingFilter] buildings", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||
|
@ -210,6 +210,11 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
||||
|
||||
Applicable to: Global
|
||||
|
||||
??? example "[stats] per every [amount] [civWideStat]"
|
||||
Example: "[+1 Gold, +2 Production] per every [3] [Gold]"
|
||||
|
||||
Applicable to: Global
|
||||
|
||||
??? example "[stats] in cities on [terrainFilter] tiles"
|
||||
Example: "[+1 Gold, +2 Production] in cities on [Fresh Water] tiles"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user