diff options
author | Cheng Hann Gan <chenghanngan.us@gmail.com> | 2021-10-28 12:01:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 09:01:07 -0700 |
commit | dd128d78c6da20395edcbe8dab8a224aa6679146 (patch) | |
tree | deec8715283a26754ec64e7dabdeca25faf7e361 /src/dungeon_pokemon_attributes_1.c | |
parent | c98fb2c11272680a20b9cfb9efe2ce482d3779dd (diff) |
Decomped more dungeon AI (#67)
* Decomped IsMovingClient()
* Fixed typos in boss dialogue
* Fixed spelling of Pelipper
* Decomped CannotUseItems
* Decomped ShouldAvoidEnemies()
* Decomped HasAbility()
* Decomped HasTactic()
* Decomped CannotMove
* Decomped CannotAct() and IsCharging()
Diffstat (limited to 'src/dungeon_pokemon_attributes_1.c')
-rw-r--r-- | src/dungeon_pokemon_attributes_1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dungeon_pokemon_attributes_1.c b/src/dungeon_pokemon_attributes_1.c new file mode 100644 index 0000000..b0a670a --- /dev/null +++ b/src/dungeon_pokemon_attributes_1.c @@ -0,0 +1,15 @@ +#include "global.h" +#include "dungeon_pokemon_attributes_1.h" + +#include "constants/tactic.h" + +bool8 HasTactic(struct DungeonEntity *pokemon, u8 tactic) +{ + struct DungeonEntityData *pokemonData = pokemon->entityData; + if (pokemonData->isLeader) + { + bool8 isGoTheOtherWay = tactic == TACTIC_GO_THE_OTHER_WAY; + return isGoTheOtherWay; + } + return pokemonData->tactic == tactic; +} |