summaryrefslogtreecommitdiff
path: root/src/status_checker_1.c
diff options
context:
space:
mode:
authorAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-02-28 20:57:06 -0500
committerAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-03-10 22:32:17 -0500
commit91c0a142ccf4783c65aecdd75a4faed33edf3ed6 (patch)
treeb0bfeddb426b59d995d6ac75f0e7aa046723843f /src/status_checker_1.c
parent17a6ab37944e3cc9fc98ee93262bd4385bf4e626 (diff)
Decomped HasLastUsedMove()
Diffstat (limited to 'src/status_checker_1.c')
-rw-r--r--src/status_checker_1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/status_checker_1.c b/src/status_checker_1.c
new file mode 100644
index 0000000..ebe6db6
--- /dev/null
+++ b/src/status_checker_1.c
@@ -0,0 +1,21 @@
+#include "global.h"
+#include "status_checker_1.h"
+
+#include "dungeon_entity.h"
+
+bool8 HasLastUsedMove(struct PokemonMove *moves)
+{
+ s32 i;
+ for (i = 0; i < MAX_MON_MOVES; i++)
+ {
+ if (moves[i].moveFlags & MOVE_FLAG_EXISTS && moves[i].moveFlags & MOVE_FLAG_LAST_USED)
+ {
+ return TRUE;
+ }
+ }
+ if (moves[STRUGGLE_MOVE_INDEX].moveFlags & MOVE_FLAG_LAST_USED)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}