From c5cd6e137fbad180a21ec24a50fde76633db0c20 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Thu, 20 Jan 2022 18:12:17 -0500 Subject: Decomped IsSleeping() -Function provided by SethBarberee. --- src/status_checks_1.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/status_checks_1.c b/src/status_checks_1.c index 32ed6bf..9d0bfe8 100644 --- a/src/status_checks_1.c +++ b/src/status_checks_1.c @@ -42,3 +42,14 @@ bool8 HasNegativeStatus(struct DungeonEntity *pokemon) } return FALSE; } + +bool8 IsSleeping(struct DungeonEntity *pokemon) +{ + if (pokemon->entityData->sleepStatus != SLEEP_STATUS_SLEEP && + pokemon->entityData->sleepStatus != SLEEP_STATUS_NAPPING && + pokemon->entityData->sleepStatus != SLEEP_STATUS_NIGHTMARE) + { + return FALSE; + } + return TRUE; +} -- cgit v1.2.3