mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-23 21:22:39 +07:00
Remove city-state construction bonuses from difficulty
This commit is contained in:
parent
054bc528ff
commit
b620d23ff5
@ -121,7 +121,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
|
|||||||
|
|
||||||
if (civInfo.isCityState())
|
if (civInfo.isCityState())
|
||||||
productionCost *= 1.5f
|
productionCost *= 1.5f
|
||||||
if (civInfo.isHuman()) {
|
else if (civInfo.isHuman()) {
|
||||||
if (!isWonder)
|
if (!isWonder)
|
||||||
productionCost *= civInfo.getDifficulty().buildingCostModifier
|
productionCost *= civInfo.getDifficulty().buildingCostModifier
|
||||||
} else {
|
} else {
|
||||||
@ -259,7 +259,6 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
|
|||||||
if (unique.type != UniqueType.OnlyAvailable && unique.type != UniqueType.CanOnlyBeBuiltWhen &&
|
if (unique.type != UniqueType.OnlyAvailable && unique.type != UniqueType.CanOnlyBeBuiltWhen &&
|
||||||
!unique.conditionalsApply(StateForConditionals(civ, cityConstructions.city))) continue
|
!unique.conditionalsApply(StateForConditionals(civ, cityConstructions.city))) continue
|
||||||
|
|
||||||
@Suppress("NON_EXHAUSTIVE_WHEN")
|
|
||||||
when (unique.type) {
|
when (unique.type) {
|
||||||
// for buildings that are created as side effects of other things, and not directly built,
|
// for buildings that are created as side effects of other things, and not directly built,
|
||||||
// or for buildings that can only be bought
|
// or for buildings that can only be bought
|
||||||
|
@ -22,12 +22,13 @@ class BaseUnitCost(val baseUnit: BaseUnit) {
|
|||||||
for (unique in baseUnit.getMatchingUniques(UniqueType.CostPercentageChange, stateForConditionals))
|
for (unique in baseUnit.getMatchingUniques(UniqueType.CostPercentageChange, stateForConditionals))
|
||||||
productionCost *= unique.params[0].toPercent()
|
productionCost *= unique.params[0].toPercent()
|
||||||
|
|
||||||
if (civInfo.isCityState())
|
productionCost *= if (civInfo.isCityState())
|
||||||
productionCost *= 1.5f
|
1.5f
|
||||||
productionCost *= if (civInfo.isHuman())
|
else if (civInfo.isHuman())
|
||||||
civInfo.getDifficulty().unitCostModifier
|
civInfo.getDifficulty().unitCostModifier
|
||||||
else
|
else
|
||||||
civInfo.gameInfo.getDifficulty().aiUnitCostModifier
|
civInfo.gameInfo.getDifficulty().aiUnitCostModifier
|
||||||
|
|
||||||
productionCost *= civInfo.gameInfo.speed.productionCostModifier
|
productionCost *= civInfo.gameInfo.speed.productionCostModifier
|
||||||
return productionCost.toInt()
|
return productionCost.toInt()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user