Fix unit triggers not triggering/triggering off the wrong units (#10496)

This commit is contained in:
SeventhM 2023-11-18 12:35:01 -08:00 committed by GitHub
parent 6fe9b7ea7f
commit accb62a0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ class UnitManager(val civInfo:Civilization) {
UniqueTriggerActivation.triggerUnitwideUnique(unique, unit, triggerNotificationText = triggerNotificationText)
for (unique in civInfo.getTriggeredUniques(UniqueType.TriggerUponGainingUnit))
if (unique.conditionals.any { it.isOfType(UniqueType.TriggerUponGainingUnit) &&
unit.matchesFilter(unique.params[0]) })
unit.matchesFilter(it.params[0]) })
UniqueTriggerActivation.triggerCivwideUnique(unique, civInfo, triggerNotificationText = triggerNotificationText)
if (unit.getResourceRequirementsPerTurn().isNotEmpty())
civInfo.cache.updateCivResources()