diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-12-01 16:33:06 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 14:33:06 -0800 |
commit | 4fc272fea6bc7332fae031ebeb12362cff1c35de (patch) | |
tree | 88092c6da3a6bb741caceab54f5372aee4ad5bae /src/dungeon_ai_items.c | |
parent | fd8720b75c56ef3f641e6c5abf6c446929c824b9 (diff) |
No wifi + 2 days on train = more decomp (#80)
* No wifi + 2 days on train = more decomp
* layin some more
* one func, one file
Diffstat (limited to 'src/dungeon_ai_items.c')
-rw-r--r-- | src/dungeon_ai_items.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dungeon_ai_items.c b/src/dungeon_ai_items.c index 4877712..7a348f1 100644 --- a/src/dungeon_ai_items.c +++ b/src/dungeon_ai_items.c @@ -27,12 +27,35 @@ extern u32 GetEntityType(struct DungeonEntity*); extern struct ItemSlot* GetItemData(struct DungeonEntity*); extern u32 EvaluateItem(struct DungeonEntity*, struct ItemSlot*, u8); extern bool8 ToolboxEnabled(struct DungeonEntityData*); +extern void sub_8077274(struct DungeonEntity *, struct DungeonEntity *); +extern bool8 EntityExists(struct DungeonEntity *); extern s32 gNumPotentialTargets; extern u32 gPotentialTargetWeights[NUM_DIRECTIONS]; extern u32 gPotentialTargetDirections[NUM_DIRECTIONS]; extern struct TeamInventory *gTeamInventory_203B460; +extern struct DungeonGlobalData *gDungeonGlobalData; + +void sub_807360C(struct DungeonEntity *pokemon) +{ + s32 iVar2; + struct DungeonEntity *entity; + + for(iVar2 = 0; iVar2 < DUNGEON_MAX_POKEMON; iVar2++) + { + entity = gDungeonGlobalData->allPokemon[iVar2]; + if(EntityExists(entity)) + { + if(entity->entityData->unk152 != 0) + { + entity->entityData->unk152 = 0; + sub_8077274(entity, entity); + } + } + } +} + void DecideUseItem(struct DungeonEntity *pokemon) { struct DungeonEntityData *pokemonData = pokemon->entityData; |