diff --git a/core/src/com/unciv/logic/civilization/managers/UnitManager.kt b/core/src/com/unciv/logic/civilization/managers/UnitManager.kt index e2a148a061..0f55b4d6d1 100644 --- a/core/src/com/unciv/logic/civilization/managers/UnitManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/UnitManager.kt @@ -102,14 +102,14 @@ class UnitManager(val civInfo: Civilization) { if (!unique.hasTriggerConditional() && unique.conditionalsApply(unit.cache.state)) UniqueTriggerActivation.triggerUnique(unique, unit, triggerNotificationText = triggerNotificationText) - for (unique in civInfo.getTriggeredUniques(UniqueType.TriggerUponGainingUnit) + for (unique in civInfo.getTriggeredUniques(UniqueType.TriggerUponGainingUnit, unit.cache.state) { unit.matchesFilter(it.params[0]) }) UniqueTriggerActivation.triggerUnique(unique, unit, triggerNotificationText = triggerNotificationText) if (unit.getResourceRequirementsPerTurn().isNotEmpty()) civInfo.cache.updateCivResources() - for (unique in civInfo.getMatchingUniques(UniqueType.LandUnitsCrossTerrainAfterUnitGained)) { + for (unique in civInfo.getMatchingUniques(UniqueType.LandUnitsCrossTerrainAfterUnitGained, unit.cache.state)) { if (unit.matchesFilter(unique.params[1])) { civInfo.passThroughImpassableUnlocked = true // Update the cached Boolean civInfo.passableImpassables.add(unique.params[0]) // Add to list of passable impassables