summaryrefslogtreecommitdiff
path: root/src/dungeon_ai_item_weight.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-02-27 08:43:59 -0800
committerGitHub <noreply@github.com>2022-02-27 08:43:59 -0800
commitea1aa9c0c5c3a4167912d1078fffdd5e69cbbe98 (patch)
tree1d3f29615f1683fae77ade7d8713e7bfe5a11c26 /src/dungeon_ai_item_weight.c
parent0dd38993f6a4383d6d5743fd0ae0abc01210ae25 (diff)
parenta5296a2f994a0f8e4421c4afd6bac1cedcfb72be (diff)
Merge pull request #97 from AnonymousRandomPerson/master
More attack AI decomp
Diffstat (limited to 'src/dungeon_ai_item_weight.c')
-rw-r--r--src/dungeon_ai_item_weight.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dungeon_ai_item_weight.c b/src/dungeon_ai_item_weight.c
index 0fe019f..ce79ad4 100644
--- a/src/dungeon_ai_item_weight.c
+++ b/src/dungeon_ai_item_weight.c
@@ -3,7 +3,7 @@
#include "constants/status.h"
#include "constants/targeting.h"
-#include "dungeon_ai_1.h"
+#include "dungeon_ai_targeting_2.h"
#include "dungeon_map_access.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util.h"
@@ -185,7 +185,7 @@ u32 EvaluateItem(struct DungeonEntity *targetPokemon, struct ItemSlot *item, u32
}
break;
case ITEM_ID_QUICK_SEED:
- if (targetPokemon->entityData->movementSpeed <= 3)
+ if (targetPokemon->entityData->movementSpeed < MAX_MOVEMENT_SPEED)
{
if (CanTargetAdjacentPokemon(targetPokemon))
{
@@ -448,7 +448,7 @@ bool8 CanTargetAdjacentPokemon(struct DungeonEntity *pokemon)
s32 facingDir;
for (facingDir = 0; facingDir < NUM_DIRECTIONS; facingDir++)
{
- struct MapTile *mapTile = GetMapTileAtPosition(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, pokemon->posWorld.y + gAdjacentTileOffsets[facingDir].y);
+ struct MapTile *mapTile = GetMapTile_1(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, pokemon->posWorld.y + gAdjacentTileOffsets[facingDir].y);
struct DungeonEntity *adjacentPokemon = mapTile->pokemon;
if (adjacentPokemon != NULL && GetEntityType(adjacentPokemon) != ENTITY_NONE &&
CanTarget(pokemon, adjacentPokemon, FALSE, TRUE) == TARGET_CAPABILITY_CAN_TARGET)