bugfix: AI evaluation of ButItemsDiscount no longer crashes

This commit is contained in:
Yair Morgenstern 2023-06-11 11:10:33 +03:00
parent 86aa3b842b
commit 4dad953db9
2 changed files with 5 additions and 3 deletions

View File

@ -382,8 +382,10 @@ object ReligionAutomation {
unique.params[0].toFloat() * goodLateModifier / 5f
UniqueType.FaithCostOfGreatProphetChange ->
-unique.params[0].toFloat() * goodLateModifier / 2f
UniqueType.BuyBuildingsDiscount, UniqueType.BuyItemsDiscount, UniqueType.BuyUnitsDiscount ->
UniqueType.BuyBuildingsDiscount, UniqueType.BuyUnitsDiscount ->
-unique.params[2].toFloat() * goodLateModifier / 5f
UniqueType.BuyItemsDiscount ->
-unique.params[1].toFloat() * goodLateModifier / 5f
else -> 0f
}
}

View File

@ -1758,12 +1758,12 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Conditional
??? example "<after adopting [policy]>"
??? example "<after adopting [policy/belief]>"
Example: "<after adopting [Oligarchy]>"
Applicable to: Conditional
??? example "<before adopting [policy]>"
??? example "<before adopting [policy/belief]>"
Example: "<before adopting [Oligarchy]>"
Applicable to: Conditional