diff options
Diffstat (limited to 'src/status_checks_1.c')
-rw-r--r-- | src/status_checks_1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/status_checks_1.c b/src/status_checks_1.c index 9d0bfe8..c49e127 100644 --- a/src/status_checks_1.c +++ b/src/status_checks_1.c @@ -53,3 +53,19 @@ bool8 IsSleeping(struct DungeonEntity *pokemon) } return TRUE; } + +bool8 HasQuarterHPOrLess(struct DungeonEntity* pokemon) +{ + struct DungeonEntityData *pokemonData = pokemon->entityData; + struct DungeonEntityData *pokemonData2 = pokemon->entityData; + s32 maxHP = pokemonData->maxHP; + if (maxHP < 0) + { + maxHP += 3; + } + if (pokemonData2->HP <= maxHP >> 2) + { + return TRUE; + } + return FALSE; +} |