From a02346be01efa13b6d969a89be642e3450f7ca35 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 13 Feb 2022 22:02:17 -0500 Subject: Decomped FindMoveTarget() --- include/dungeon_ai_attack.h | 9 +++++++++ include/map.h | 2 +- include/moves.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dungeon_ai_attack.h b/include/dungeon_ai_attack.h index 77b53fc..1878889 100644 --- a/include/dungeon_ai_attack.h +++ b/include/dungeon_ai_attack.h @@ -3,7 +3,16 @@ #include "dungeon_entity.h" +struct MoveTargetResults +{ + bool8 moveUsable; + u8 targetDir; + s32 moveWeight; +}; + // 0x7BB94 void DecideAttack(struct DungeonEntity *pokemon); +// 0x7C04C +s32 FindMoveTarget(struct MoveTargetResults *moveTargetResults, struct DungeonEntity *pokemon, struct PokemonMove *move); #endif diff --git a/include/map.h b/include/map.h index 9122f00..3601a14 100644 --- a/include/map.h +++ b/include/map.h @@ -38,7 +38,7 @@ struct MapTile u8 unk8; /* 0x9 */ u8 roomIndex; // Bitwise flags for whether Pokémon can move to an adjacent tile. Bits correspond to directions in direction.h. - // Different sets of flags are used for Pokémon that can cross special terrain, corresponding to Cthe rossableTerrain enum. + // Different sets of flags are used for Pokémon that can cross special terrain, corresponding to the CrossableTerrain enum. /* 0xA */ u8 canMoveAdjacent[NUM_CROSSABLE_TERRAIN]; u8 fillE[0x10 - 0xE]; /* 0x10 */ struct DungeonEntity *pokemon; // Pokémon on the tile. diff --git a/include/moves.h b/include/moves.h index 847f167..c86f986 100644 --- a/include/moves.h +++ b/include/moves.h @@ -9,5 +9,7 @@ void InitPokemonMove(struct PokemonMove *move, u16 moveID); u8 GetMoveWeight(struct PokemonMove *move); // 0x92BF4 u32 GetMoveMaxPP(struct PokemonMove *move); +// 0x92C54 +bool8 GetMoveDealsDirectDamage(struct PokemonMove *move); #endif -- cgit v1.2.3