diff options
Diffstat (limited to 'src/status_checker.c')
-rw-r--r-- | src/status_checker.c | 18 |
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; +} |