Try to fix a potentially miscapitalized/broken policy cost unique. (#6016)

* Try to fix a potentially miscapitalized/broken policy cost unique.

* Deprecate old capitalization.
This commit is contained in:
will-ca 2022-01-23 09:08:59 -08:00 committed by GitHub
parent da748a96f9
commit 8461032a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -166,7 +166,7 @@
},
{
"name": "Free Religion",
"uniques": ["[-10]% Culture cost of adopting new policies"],
"uniques": ["[-10]% Culture cost of adopting new Policies"],
"requires": ["Mandate Of Heaven", "Reformation"],
"row": 3,
"column": 4

View File

@ -91,7 +91,7 @@ class PolicyManager {
for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCostDeprecated))
policyCultureCost *= 1 - unique.params[0].toFloat() / 100
//
for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCost))
for (unique in civInfo.getMatchingUniques(UniqueType.LessPolicyCost) + civInfo.getMatchingUniques(UniqueType.LessPolicyCostDeprecated2))
policyCultureCost *= unique.params[0].toPercent()
if (civInfo.isPlayerCivilization())
policyCultureCost *= civInfo.getDifficulty().policyCostModifier

View File

@ -205,9 +205,11 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
@Deprecated("As of 3.18.17", ReplaceWith("[+amount] Happiness from each type of luxury resource"))
BonusHappinessFromLuxuryDeprecated("+[amount] happiness from each type of luxury resource", UniqueTarget.Global),
LessPolicyCostFromCities("Each city founded increases culture cost of policies [amount]% less than normal", UniqueTarget.Global),
LessPolicyCost("[amount]% Culture cost of adopting new policies", UniqueTarget.Global),
@Deprecated("As of 3.18.17", ReplaceWith("[amount]% Culture cost of adopting new policies"))
LessPolicyCost("[amount]% Culture cost of adopting new Policies", UniqueTarget.Global),
@Deprecated("As of 3.18.17", ReplaceWith("[amount]% Culture cost of adopting new Policies"))
LessPolicyCostDeprecated("Culture cost of adopting new Policies reduced by [amount]%", UniqueTarget.Global),
@Deprecated("As of 3.19.1", ReplaceWith("[amount]% Culture cost of adopting new Policies"))
LessPolicyCostDeprecated2("[amount]% Culture cost of adopting new policies", UniqueTarget.Global),
EnablesOpenBorders("Enables Open Borders agreements", UniqueTarget.Global),
// Should the 'R' in 'Research agreements' be capitalized?