From fab8242c6acf1685eeafe1abcd997192cce66396 Mon Sep 17 00:00:00 2001 From: givehub99 <71454921+givehub99@users.noreply.github.com> Date: Wed, 30 Sep 2020 23:51:24 -0700 Subject: [PATCH] "[] units gain the [] promotion" (#3204) --- core/src/com/unciv/logic/map/TileMap.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/com/unciv/logic/map/TileMap.kt b/core/src/com/unciv/logic/map/TileMap.kt index 0b0930ec06..6b74f87b09 100644 --- a/core/src/com/unciv/logic/map/TileMap.kt +++ b/core/src/com/unciv/logic/map/TileMap.kt @@ -167,6 +167,12 @@ class TileMap { for (promotion in unit.baseUnit.promotions) unit.promotions.addPromotion(promotion, true) + for (unique in civInfo.getMatchingUniques("[] units gain the [] promotion")) { + if (unique.params[0] == unit.type.name) { + unit.promotions.addPromotion(unique.params[1], true) + } + } + // And update civ stats, since the new unit changes both unit upkeep and resource consumption civInfo.updateStatsForNextTurn() civInfo.updateDetailedCivResources()