Parameterize Civ Unique for increased XP gain (#3561)

* no message

* Revert "no message"

This reverts commit 9ece60bd58.

* Renamed Haka War Dance effect to Intimidation, to make it more applicable to non-Maori Warrior units.

* no message

* Parameterized civUnique for extra experience from combat

* Update build.gradle.kts

* Update BattleDamage.kt

* Update Policies.json

* Update Battle.kt

* Fully parameterized nationwide XP gain
This commit is contained in:
SpacedOutChicken 2021-01-29 03:31:52 -07:00 committed by GitHub
parent 1b19413736
commit 457588a2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -105,7 +105,7 @@
},
{
"name": "Military Tradition",
"uniques":["Military units gain 50% more Experience from combat"],
"uniques":["[Military] units gain [50]% more Experience from combat"],
"requires": ["Warrior Code"],
"row": 2,
"column": 2

View File

@ -258,7 +258,12 @@ object Battle {
return
var XPModifier = 1f
// deprecated as of 3.12.10, keeping this for now in to avoid breaking mods
if (thisCombatant.getCivInfo().hasUnique("Military units gain 50% more Experience from combat")) XPModifier += 0.5f
for (unique in thisCombatant.getCivInfo().getMatchingUniques("[] units gain []% more Experience from combat")) {
if (thisCombatant.unit.matchesFilter(unique.params[0]))
XPModifier += unique.params[1].toFloat() / 100
}
for (unique in thisCombatant.unit.getMatchingUniques("[]% Bonus XP gain"))
XPModifier += unique.params[0].toFloat() / 100
@ -504,4 +509,4 @@ object Battle {
return true
}
}
}