mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 21:29:00 +00:00
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:
parent
6d705325fe
commit
903a4164e9
1 changed files with 1 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue