adds val to modoptions and check to battle.kt to adjust max xp from barbarians (#3389)

This commit is contained in:
9kgsofrice
2020-12-02 21:04:00 +00:00
committed by GitHub
parent 525cea1cc9
commit 1f5fa74cea
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -32,6 +32,7 @@ class ModOptions {
var unitsToRemove = HashSet<String>()
var nationsToRemove = HashSet<String>()
var uniques = HashSet<String>()
val maxXPfromBarbarians = 30
}
class Ruleset {