summaryrefslogtreecommitdiff
path: root/src/dungeon_ai_attack_1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dungeon_ai_attack_1.c')
-rw-r--r--src/dungeon_ai_attack_1.c5
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;