Ensure that each uniquetype specified returns a value =- thank you amazing Kotlin compiler :)

This commit is contained in:
Yair Morgenstern 2024-02-20 14:03:51 +02:00
parent 3a7401a939
commit fc6d913204

View File

@ -855,7 +855,7 @@ object UniqueTriggerActivation {
UniqueType.OneTimeUnitHeal -> {
if (unit == null) return null
if (unit.health == 100)
if (unit.health == 100) return null
return {
unit.healBy(unique.params[0].toInt())
if (notification != null)
@ -926,9 +926,8 @@ object UniqueTriggerActivation {
true
}
}
else -> {}
else -> return null
}
return null
}
private fun getNotificationText(notification: String?, triggerNotificationText: String?, effectNotificationText: String): String? {