From 49f0fe725a7996644a56179aa002343314e9ab93 Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Tue, 29 Jan 2019 18:24:28 +0800 Subject: [PATCH] Free promotions don't affect future xp. --- core/src/com/unciv/logic/map/UnitPromotions.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/map/UnitPromotions.kt b/core/src/com/unciv/logic/map/UnitPromotions.kt index 564d5c0c3c..81a7f661cb 100644 --- a/core/src/com/unciv/logic/map/UnitPromotions.kt +++ b/core/src/com/unciv/logic/map/UnitPromotions.kt @@ -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 }