mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-26 07:39:44 +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!
|
// XP!
|
||||||
private fun addXp(thisCombatant:ICombatant, amount:Int, otherCombatant:ICombatant){
|
private fun addXp(thisCombatant:ICombatant, amount:Int, otherCombatant:ICombatant){
|
||||||
if(thisCombatant !is MapUnitCombatant) return
|
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
|
return
|
||||||
|
|
||||||
var XPModifier = 1f
|
var XPModifier = 1f
|
||||||
|
@ -32,6 +32,7 @@ class ModOptions {
|
|||||||
var unitsToRemove = HashSet<String>()
|
var unitsToRemove = HashSet<String>()
|
||||||
var nationsToRemove = HashSet<String>()
|
var nationsToRemove = HashSet<String>()
|
||||||
var uniques = HashSet<String>()
|
var uniques = HashSet<String>()
|
||||||
|
val maxXPfromBarbarians = 30
|
||||||
}
|
}
|
||||||
|
|
||||||
class Ruleset {
|
class Ruleset {
|
||||||
|
Reference in New Issue
Block a user