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