mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 15:01:09 -04: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:
parent
fe38249dc1
commit
ee5aa38129
@ -283,8 +283,10 @@ object Battle {
|
|||||||
|
|
||||||
if(thisCombatant.getCivInfo().isMajorCiv()) {
|
if(thisCombatant.getCivInfo().isMajorCiv()) {
|
||||||
var greatGeneralPointsModifier = 1f
|
var greatGeneralPointsModifier = 1f
|
||||||
for (unique in thisCombatant.unit.getMatchingUniques("[] is earned []% faster"))
|
val unitUniques = thisCombatant.unit.getMatchingUniques("[] is earned []% faster")
|
||||||
if (unique.params[0] == Constants.greatGeneral)
|
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
|
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
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user