diff options
author | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-02-13 22:30:25 -0500 |
---|---|---|
committer | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-02-13 22:30:25 -0500 |
commit | 3bbb6035e746cdb83b128b1d6153436756cb3be0 (patch) | |
tree | d92d7d818749543e4d7012411198c6dac9750468 /src/dungeon_ai_attack.c | |
parent | a02346be01efa13b6d969a89be642e3450f7ca35 (diff) |
Decomped GetMoveTargetingFlagsForPokemon()
Diffstat (limited to 'src/dungeon_ai_attack.c')
-rw-r--r-- | src/dungeon_ai_attack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index 5667d75..f0362ed 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -25,6 +25,7 @@ #include "position_util.h" #include "status_checks.h" #include "targeting.h" +#include "targeting_flags.h" #define REGULAR_ATTACK_INDEX 4 @@ -38,7 +39,6 @@ extern struct DungeonEntity *gPotentialTargets[NUM_DIRECTIONS]; extern bool8 IsMoveUsable(struct DungeonEntity*, s32, bool8); extern bool8 TargetRegularAttack(struct DungeonEntity*, u32*, bool8); -extern s16 GetTargetingFlags(struct DungeonEntity*, struct PokemonMove*, bool8); extern bool8 CanUseWithStatusChecker(struct DungeonEntity*, struct PokemonMove*); extern bool8 CanAttackInFront(struct DungeonEntity*, s32); extern s32 WeightMoveIfUsable(s32, s32, struct DungeonEntity*, struct DungeonEntity*, struct PokemonMove*, bool8); @@ -346,7 +346,7 @@ s32 FindMoveTarget(struct MoveTargetResults *moveTargetResults, struct DungeonEn { gCanAttackInDirection[i] = FALSE; } - targetingFlags = GetTargetingFlags(pokemon, move, TRUE); + targetingFlags = GetMoveTargetingFlagsForPokemon(pokemon, move, TRUE); hasStatusChecker = HasIQSkill(pokemon, IQ_SKILL_STATUS_CHECKER); moveTargetResults->moveUsable = FALSE; if ((pokemonData->volatileStatus == VOLATILE_STATUS_TAUNTED && !GetMoveDealsDirectDamage(move)) || @@ -477,7 +477,7 @@ s32 FindMoveTarget(struct MoveTargetResults *moveTargetResults, struct DungeonEn } } } - else if (rangeTargetingFlags == TARGETING_FLAG_SELF_HEAL) + else if (rangeTargetingFlags == TARGETING_FLAG_TARGET_SELF) { numPotentialTargets = WeightMoveIfUsable(numPotentialTargets, targetingFlags, pokemon, pokemon, move, hasStatusChecker); } |