Remove city-state construction bonuses from difficulty

This commit is contained in:
yairm210 2024-04-07 22:04:05 +03:00
parent 054bc528ff
commit b620d23ff5
2 changed files with 5 additions and 5 deletions

View File

@ -121,7 +121,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
if (civInfo.isCityState())
productionCost *= 1.5f
if (civInfo.isHuman()) {
else if (civInfo.isHuman()) {
if (!isWonder)
productionCost *= civInfo.getDifficulty().buildingCostModifier
} else {
@ -259,7 +259,6 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
if (unique.type != UniqueType.OnlyAvailable && unique.type != UniqueType.CanOnlyBeBuiltWhen &&
!unique.conditionalsApply(StateForConditionals(civ, cityConstructions.city))) continue
@Suppress("NON_EXHAUSTIVE_WHEN")
when (unique.type) {
// for buildings that are created as side effects of other things, and not directly built,
// or for buildings that can only be bought

View File

@ -22,12 +22,13 @@ class BaseUnitCost(val baseUnit: BaseUnit) {
for (unique in baseUnit.getMatchingUniques(UniqueType.CostPercentageChange, stateForConditionals))
productionCost *= unique.params[0].toPercent()
if (civInfo.isCityState())
productionCost *= 1.5f
productionCost *= if (civInfo.isHuman())
productionCost *= if (civInfo.isCityState())
1.5f
else if (civInfo.isHuman())
civInfo.getDifficulty().unitCostModifier
else
civInfo.gameInfo.getDifficulty().aiUnitCostModifier
productionCost *= civInfo.gameInfo.speed.productionCostModifier
return productionCost.toInt()
}