summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-02-28 21:04:40 -0500
committerAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-03-10 22:32:17 -0500
commit07285e7e82db008b1f322879f3b22c8eb437a8de (patch)
tree505c70dab18c81a2320ca378ff2ef5101ef8dec7 /src
parent91c0a142ccf4783c65aecdd75a4faed33edf3ed6 (diff)
Decomped HasDisabledMove()
Diffstat (limited to 'src')
-rw-r--r--src/status_checker.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/status_checker.c b/src/status_checker.c
index de1bd65..e835acf 100644
--- a/src/status_checker.c
+++ b/src/status_checker.c
@@ -99,7 +99,6 @@ const u8 gDungeonCamouflageTypes[76] = {
TYPE_ROCK
};
-extern bool8 HasDisabledMove(struct PokemonMove *moves);
extern bool8 LastMoveOutOfPP(struct PokemonMove *moves);
bool8 CanUseOnSelfWithStatusChecker(struct DungeonEntity *pokemon, struct PokemonMove *move)
@@ -903,3 +902,20 @@ bool8 CanUseOnTargetWithStatusChecker(struct DungeonEntity *user, struct Dungeon
}
return TRUE;
}
+
+bool8 HasDisabledMove(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_DISABLED)
+ {
+ return TRUE;
+ }
+ }
+ if (moves[STRUGGLE_MOVE_INDEX].moveFlags & MOVE_FLAG_DISABLED)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}