mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-23 06:08:46 +07:00
adds val to modoptions and check to battle.kt to adjust max xp from barbarians (#3389)
This commit is contained in:
@ -267,7 +267,7 @@ object Battle {
|
||||
// XP!
|
||||
private fun addXp(thisCombatant:ICombatant, amount:Int, otherCombatant:ICombatant){
|
||||
if(thisCombatant !is MapUnitCombatant) return
|
||||
if(thisCombatant.unit.promotions.totalXpProduced() >= 30 && otherCombatant.getCivInfo().isBarbarian())
|
||||
if(thisCombatant.unit.promotions.totalXpProduced() >= thisCombatant.unit.civInfo.gameInfo.ruleSet.modOptions.maxXPfromBarbarians && otherCombatant.getCivInfo().isBarbarian())
|
||||
return
|
||||
|
||||
var XPModifier = 1f
|
||||
|
@ -32,6 +32,7 @@ class ModOptions {
|
||||
var unitsToRemove = HashSet<String>()
|
||||
var nationsToRemove = HashSet<String>()
|
||||
var uniques = HashSet<String>()
|
||||
val maxXPfromBarbarians = 30
|
||||
}
|
||||
|
||||
class Ruleset {
|
||||
|
Reference in New Issue
Block a user