diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2022-02-27 08:43:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-27 08:43:59 -0800 |
commit | ea1aa9c0c5c3a4167912d1078fffdd5e69cbbe98 (patch) | |
tree | 1d3f29615f1683fae77ade7d8713e7bfe5a11c26 /src/dungeon_capabilities_1.c | |
parent | 0dd38993f6a4383d6d5743fd0ae0abc01210ae25 (diff) | |
parent | a5296a2f994a0f8e4421c4afd6bac1cedcfb72be (diff) |
Merge pull request #97 from AnonymousRandomPerson/master
More attack AI decomp
Diffstat (limited to 'src/dungeon_capabilities_1.c')
-rw-r--r-- | src/dungeon_capabilities_1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dungeon_capabilities_1.c b/src/dungeon_capabilities_1.c index e6ec6fa..ef566fe 100644 --- a/src/dungeon_capabilities_1.c +++ b/src/dungeon_capabilities_1.c @@ -5,7 +5,7 @@ #include "constants/iq_skill.h" #include "constants/status.h" #include "charge_move.h" -#include "dungeon_ai.h" +#include "dungeon_ai_targeting_1.h" #include "dungeon_capabilities.h" #include "dungeon_engine.h" #include "dungeon_items.h" @@ -15,7 +15,7 @@ #include "dungeon_util.h" #include "map.h" -const u8 gDirectionBitMasks[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +const u8 gDirectionBitMasks_1[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; static inline bool8 JoinLocationCannotUseItems(struct DungeonEntityData *pokemonData) { @@ -89,7 +89,7 @@ bool8 CannotAttack(struct DungeonEntity *pokemon, bool8 skipSleep) bool8 CanMoveInDirection(struct DungeonEntity *pokemon, u32 facingDir) { u8 crossableTerrain = GetCrossableTerrain(pokemon->entityData->entityID); - struct MapTile *currentMapTile = GetMapTileAtPosition(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, + struct MapTile *currentMapTile = GetMapTile_1(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, pokemon->posWorld.y + gAdjacentTileOffsets[facingDir].y); if (currentMapTile->tileType & TILE_TYPE_MAP_EDGE || currentMapTile->pokemon != NULL) { @@ -118,8 +118,8 @@ bool8 CanMoveInDirection(struct DungeonEntity *pokemon, u32 facingDir) } } } - currentMapTile = GetMapTileAtPosition(pokemon->posWorld.x, pokemon->posWorld.y); - if (!(currentMapTile->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks[facingDir & DIRECTION_MASK])) + currentMapTile = GetMapTile_1(pokemon->posWorld.x, pokemon->posWorld.y); + if (!(currentMapTile->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks_1[facingDir & DIRECTION_MASK])) { return FALSE; } |