diff options
Diffstat (limited to 'src/dungeon_movement.c')
-rw-r--r-- | src/dungeon_movement.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dungeon_movement.c b/src/dungeon_movement.c index bcf6163..d342262 100644 --- a/src/dungeon_movement.c +++ b/src/dungeon_movement.c @@ -6,6 +6,8 @@ #include "constants/iq_skill.h" #include "constants/status.h" #include "constants/targeting.h" +#include "code_80521D0.h" +#include "dungeon_action.h" #include "dungeon_ai_items.h" #include "dungeon_capabilities_1.h" #include "dungeon_global_data.h" @@ -16,6 +18,7 @@ #include "dungeon_visibility.h" #include "map.h" #include "pokemon.h" +#include "status_checks.h" extern char gAvailablePokemonNames[]; extern char *gPtrCouldntBeUsedMessage; @@ -23,10 +26,7 @@ extern char *gPtrItsaMonsterHouseMessage; extern void SendImmobilizeEndMessage(struct DungeonEntity*, struct DungeonEntity*); extern void SetMessageArgument(char[], struct DungeonEntity*, u32); -extern void SendMessage(struct DungeonEntity*, char*); -extern bool8 HasStatusAffectingActions(struct DungeonEntity*); extern void ResetAction(u16*); -extern void SetWalkAction(u16*, s16); extern void DecideAttack(struct DungeonEntity*); extern void MoveIfPossible(struct DungeonEntity*, bool8); extern u8 sub_8044B28(void); @@ -155,7 +155,7 @@ void sub_8075900(struct DungeonEntity *pokemon, u8 r1) void DecideAction(struct DungeonEntity *pokemon) { struct DungeonEntityData *pokemonData = pokemon->entityData; - if ((pokemonData->flags & MOVEMENT_FLAG_SWAPPED_PLACES_PETRIFIED) != 0) + if (pokemonData->flags & MOVEMENT_FLAG_SWAPPED_PLACES_PETRIFIED) { if (pokemonData->immobilizeStatus == IMMOBILIZE_STATUS_PETRIFIED) { @@ -209,8 +209,8 @@ void DecideAction(struct DungeonEntity *pokemon) ResetAction(&pokemonData->action.action); if (pokemonData->clientType == CLIENT_TYPE_CLIENT) { - SetWalkAction(&pokemonData->action.action, pokemonData->entityID); - pokemonData->action.facingDir = DungeonRandomCapped(8); + SetWalkAction(&pokemonData->action, pokemonData->entityID); + pokemonData->action.facingDir = DungeonRandomCapped(NUM_DIRECTIONS); pokemonData->targetPosition.x = pokemon->posWorld.x; pokemonData->targetPosition.y = pokemon->posWorld.y - 1; } @@ -228,7 +228,7 @@ void DecideAction(struct DungeonEntity *pokemon) } if (pokemonData->volatileStatus == VOLATILE_STATUS_CONFUSED) { - SetWalkAction(&pokemonData->action.action, pokemonData->entityID); + SetWalkAction(&pokemonData->action, pokemonData->entityID); } else { @@ -243,7 +243,7 @@ void DecideAction(struct DungeonEntity *pokemon) { if (pokemonData->volatileStatus == VOLATILE_STATUS_CONFUSED) { - SetWalkAction(&pokemonData->action.action, pokemonData->entityID); + SetWalkAction(&pokemonData->action, pokemonData->entityID); } else { |