summaryrefslogtreecommitdiff
path: root/src/dungeon_pokemon_attributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dungeon_pokemon_attributes.c')
-rw-r--r--src/dungeon_pokemon_attributes.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/dungeon_pokemon_attributes.c b/src/dungeon_pokemon_attributes.c
new file mode 100644
index 0000000..a9aa6c2
--- /dev/null
+++ b/src/dungeon_pokemon_attributes.c
@@ -0,0 +1,21 @@
+#include "global.h"
+#include "dungeon_pokemon_attributes.h"
+
+#include "dungeon_util.h"
+
+bool8 HasAbility(struct DungeonEntity *pokemon, u8 ability)
+{
+ if (!EntityExists(pokemon))
+ {
+ return FALSE;
+ }
+ else
+ {
+ struct DungeonEntityData *pokemonData = pokemon->entityData;
+ if (pokemonData->ability1 == ability || pokemonData->ability2 == ability)
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+}