diff --git a/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt b/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt index c2ba6b868b..0ba6de4f6b 100644 --- a/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt @@ -334,8 +334,7 @@ object UnitAutomation { } private fun startGoldenAgeIfHasAbility(unit: MapUnit) { - UnitActions.getUnitActions(unit).filter { it.type == UnitActionType.StartGoldenAge } - .firstOrNull()?.action!!.invoke() + UnitActions.getUnitActions(unit).firstOrNull { it.type == UnitActionType.StartGoldenAge }?.action?.invoke() } /** @return true only if the unit has 0 movement left */