mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Parameterize Civ Unique for increased XP gain (#3561)
* no message * Revert "no message" This reverts commit 9ece60bd583a02e80d2c4886dceb1e5d3e9996a9. * 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",
|
"name": "Military Tradition",
|
||||||
"uniques":["Military units gain 50% more Experience from combat"],
|
"uniques":["[Military] units gain [50]% more Experience from combat"],
|
||||||
"requires": ["Warrior Code"],
|
"requires": ["Warrior Code"],
|
||||||
"row": 2,
|
"row": 2,
|
||||||
"column": 2
|
"column": 2
|
||||||
|
@ -258,7 +258,12 @@ object Battle {
|
|||||||
return
|
return
|
||||||
|
|
||||||
var XPModifier = 1f
|
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
|
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"))
|
for (unique in thisCombatant.unit.getMatchingUniques("[]% Bonus XP gain"))
|
||||||
XPModifier += unique.params[0].toFloat() / 100
|
XPModifier += unique.params[0].toFloat() / 100
|
||||||
|
|
||||||
@ -504,4 +509,4 @@ object Battle {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user