summaryrefslogtreecommitdiff
path: root/src/dungeon_pokemon_attributes_1.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-11-15 11:02:26 -0800
committerGitHub <noreply@github.com>2021-11-15 11:02:26 -0800
commitbfaa55f2fe3d557570260f6b4956e39c3b0f1218 (patch)
tree77611afc222d74c9a68a5577df3ce9916d9b3b97 /src/dungeon_pokemon_attributes_1.c
parent0ea22237c933523f66d7468a953c5a5057b3a899 (diff)
Label and doc iq skills and tactics info (#75)
* label/doc iq skills/tactics info * decomp a few more dungeon_util and label some funcs * doc the IQSkills field
Diffstat (limited to 'src/dungeon_pokemon_attributes_1.c')
-rw-r--r--src/dungeon_pokemon_attributes_1.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dungeon_pokemon_attributes_1.c b/src/dungeon_pokemon_attributes_1.c
index b0a670a..ac865a9 100644
--- a/src/dungeon_pokemon_attributes_1.c
+++ b/src/dungeon_pokemon_attributes_1.c
@@ -1,8 +1,26 @@
#include "global.h"
#include "dungeon_pokemon_attributes_1.h"
+#include "constants/status.h"
#include "constants/tactic.h"
+extern bool8 IsIQSkillSet(u8 *, u32);
+extern u8 HasItem(struct DungeonEntity *, u32);
+
+bool8 sub_8071884(struct DungeonEntity *pokemon)
+{
+ struct DungeonEntityData *pokemonData = pokemon->entityData;
+ if(pokemonData->eyesightStatus != EYESIGHT_STATUS_EYEDROPS)
+ {
+ if(!HasItem(pokemon, ITEM_ID_GOGGLE_SPECS))
+ return FALSE;
+ else
+ return TRUE;
+ }
+ else
+ return TRUE;
+}
+
bool8 HasTactic(struct DungeonEntity *pokemon, u8 tactic)
{
struct DungeonEntityData *pokemonData = pokemon->entityData;
@@ -13,3 +31,13 @@ bool8 HasTactic(struct DungeonEntity *pokemon, u8 tactic)
}
return pokemonData->tactic == tactic;
}
+
+bool8 HasIQSkill(struct DungeonEntity* pokemon, u8 IQSkill)
+{
+ return IsIQSkillSet(pokemon->entityData->IQSkillsEnabled, 1 << IQSkill);
+}
+
+bool8 HasIQSkillPair(struct DungeonEntity* pokemon, u8 IQSkill1, u8 IQSkill2)
+{
+ return IsIQSkillSet(pokemon->entityData->IQSkillsEnabled, 1 << IQSkill1 | 1 << IQSkill2);
+}