mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Free promotions don't affect future xp.
This commit is contained in:
parent
c69f54408b
commit
49f0fe725a
@ -16,9 +16,11 @@ class UnitPromotions{
|
|||||||
fun canBePromoted() = XP >= xpForNextPromotion()
|
fun canBePromoted() = XP >= xpForNextPromotion()
|
||||||
|
|
||||||
fun addPromotion(promotionName:String, isFree:Boolean = false){
|
fun addPromotion(promotionName:String, isFree:Boolean = false){
|
||||||
if (!isFree) XP -= xpForNextPromotion()
|
if (!isFree) {
|
||||||
|
XP -= xpForNextPromotion()
|
||||||
|
numberOfPromotions++
|
||||||
|
}
|
||||||
promotions.add(promotionName)
|
promotions.add(promotionName)
|
||||||
numberOfPromotions++
|
|
||||||
unit.updateUniques()
|
unit.updateUniques()
|
||||||
unit.civInfo.updateViewableTiles() // some promotions give the unit bonus sight
|
unit.civInfo.updateViewableTiles() // some promotions give the unit bonus sight
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user