mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-25 22:18:50 +07:00
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:
parent
1b19413736
commit
457588a2c9
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user