Support BNW score formula (#13079)

This commit is contained in:
EmperorPinguin 2025-03-20 15:06:07 +01:00 committed by GitHub
parent e532c00e35
commit 8925744485
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -745,10 +745,11 @@ class Civilization : IsPartOfGameInfoSerialization {
if (mapSizeModifier > 1)
mapSizeModifier = (mapSizeModifier - 1) / 3 + 1
val modConstants= gameInfo.ruleset.modOptions.constants
scoreBreakdown["Cities"] = cities.size * 10 * mapSizeModifier
scoreBreakdown["Population"] = cities.sumOf { it.population.population } * 3 * mapSizeModifier
scoreBreakdown["Population"] = cities.sumOf { it.population.population } * modConstants.scoreFromPopulation * mapSizeModifier
scoreBreakdown["Tiles"] = cities.sumOf { city -> city.getTiles().filter { !it.isWater}.count() } * 1 * mapSizeModifier
scoreBreakdown["Wonders"] = 40 * cities
scoreBreakdown["Wonders"] = modConstants.scoreFromWonders * cities
.sumOf { city -> city.cityConstructions.getBuiltBuildings()
.filter { it.isWonder }.count()
}.toDouble()

View File

@ -120,6 +120,10 @@ class ModConstants {
// Steal cost equal to 125% of the most expensive stealable tech
var spyTechStealCostModifier = 1.25f
// Score value of things
var scoreFromPopulation = 3 // 4 in BNW
var scoreFromWonders = 40 // 25 in BNW
// UI: If set >= 0, ImprovementPicker will silently skip improvements whose tech requirement is more advanced than your current Era + this
var maxImprovementTechErasForward = -1