mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 21:30:20 +07:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user