Detect negative HP as user fainted

- Change isUserFainted to use <= 0.0 so negative HP values also count as fainted
- Death dialog is triggered if HP falls at/below zero
This commit is contained in:
Hafiz 2025-06-17 20:24:08 -05:00 committed by Phillip Thelen
parent 6d705325fe
commit 903a4164e9

View file

@ -40,7 +40,7 @@ constructor(
val partyID: String?
get() = validatedUser?.party?.id
val isUserFainted: Boolean
get() = (validatedUser?.stats?.hp ?: 1.0) == 0.0
get() = (validatedUser?.stats?.hp ?: 1.0) <= 0.0
val isUserInParty: Boolean
get() = validatedUser?.hasParty == true
val mirrorGroupTasks: List<String>