GG bonus generation now checks for civinfo uniques (#3412)

* great general bonus isn't applied to national uniques

check added to allow this

* added uniques together :)

* added vals in line with similar checks - more efficient(?)
This commit is contained in:
9kgsofrice
2020-12-12 18:10:39 +00:00
committed by GitHub
parent fe38249dc1
commit ee5aa38129

View File

@ -283,8 +283,10 @@ object Battle {
if(thisCombatant.getCivInfo().isMajorCiv()) {
var greatGeneralPointsModifier = 1f
for (unique in thisCombatant.unit.getMatchingUniques("[] is earned []% faster"))
if (unique.params[0] == Constants.greatGeneral)
val unitUniques = thisCombatant.unit.getMatchingUniques("[] is earned []% faster")
val civUniques = thisCombatant.unit.civInfo.getMatchingUniques("[] is earned []% faster")
for (unique in unitUniques + civUniques)
if (unique.params[0] == Constants.greatGeneral)
greatGeneralPointsModifier += unique.params[1].toFloat() / 100
if (thisCombatant.unit.hasUnique("Combat very likely to create Great Generals")) // As of 3.10.10 This is to be deprecated and converted to "[Great General] is earned []% faster" - keeping it here to that mods with this can still work for now