diff options
author | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-03-04 23:49:00 -0500 |
---|---|---|
committer | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-03-10 22:32:17 -0500 |
commit | 9a4864c1cf8c0a6da847f3b8977aaca23b712a5a (patch) | |
tree | 76958584a3a92c8b713821de6e0c72f8437628eb /src/dungeon_ai_attack_1.c | |
parent | 8c0df48b9ebd0fa794a97c6280cc59b6dfcb9eef (diff) |
Decomped WeightWeakTypePicker()
Diffstat (limited to 'src/dungeon_ai_attack_1.c')
-rw-r--r-- | src/dungeon_ai_attack_1.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dungeon_ai_attack_1.c b/src/dungeon_ai_attack_1.c index 6f70077..cef0aac 100644 --- a/src/dungeon_ai_attack_1.c +++ b/src/dungeon_ai_attack_1.c @@ -13,14 +13,13 @@ #include "position_util.h" #include "status_checker.h" #include "status_checks_1.h" +#include "type_effectiveness.h" extern bool8 gCanAttackInDirection[NUM_DIRECTIONS]; extern s32 gPotentialAttackTargetWeights[NUM_DIRECTIONS]; extern u8 gPotentialAttackTargetDirections[NUM_DIRECTIONS]; extern struct DungeonEntity *gPotentialTargets[NUM_DIRECTIONS]; -extern s32 WeightWeakTypePicker(struct DungeonEntity *user, struct DungeonEntity *target, u8 moveType); - s32 WeightMoveIfUsable(s32 numPotentialTargets, s32 targetingFlags, struct DungeonEntity *user, struct DungeonEntity *target, struct PokemonMove *move, bool32 hasStatusChecker) { s32 facingDir; @@ -147,7 +146,7 @@ bool8 CanUseStatusMove(s32 targetingFlags, struct DungeonEntity *user, struct Du else if ((targetingFlags2 & 0xF00) == TARGETING_FLAG_EXPOSE) { targetData = target->entityData; - if ((targetData->type1 != TYPE_GHOST && targetData->type2 != TYPE_GHOST) || targetData->exposedStatus) + if ((targetData->types[0] != TYPE_GHOST && targetData->types[1] != TYPE_GHOST) || targetData->exposedStatus) { if (*categoryTargetingFlags2); // Flips the conditional. goto returnFalse; |