From 07285e7e82db008b1f322879f3b22c8eb437a8de Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Mon, 28 Feb 2022 21:04:40 -0500 Subject: Decomped HasDisabledMove() --- src/status_checker.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') 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; +} -- cgit v1.2.3