Free promotions don't affect future xp.

This commit is contained in:
Duan Tao 2019-01-29 18:24:28 +08:00
parent c69f54408b
commit 49f0fe725a

View File

@ -16,9 +16,11 @@ class UnitPromotions{
fun canBePromoted() = XP >= xpForNextPromotion()
fun addPromotion(promotionName:String, isFree:Boolean = false){
if (!isFree) XP -= xpForNextPromotion()
if (!isFree) {
XP -= xpForNextPromotion()
numberOfPromotions++
}
promotions.add(promotionName)
numberOfPromotions++
unit.updateUniques()
unit.civInfo.updateViewableTiles() // some promotions give the unit bonus sight
}