summaryrefslogtreecommitdiff
path: root/src/targeting_flags.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-02-17 21:45:57 -0800
committerGitHub <noreply@github.com>2022-02-17 21:45:57 -0800
commit3555fb7c945ef5152910a84390ecbd1a38ea585d (patch)
tree4237c0ab086005ea05539b8de7c10b867eec43db /src/targeting_flags.c
parent1d64db5214b455bbd6f50ad6369ec04420e03984 (diff)
parentece475a4804a64790cfa86dfa0ba577a732adee8 (diff)
Merge pull request #96 from AnonymousRandomPerson/master
Attack AI decomp
Diffstat (limited to 'src/targeting_flags.c')
-rw-r--r--src/targeting_flags.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/targeting_flags.c b/src/targeting_flags.c
new file mode 100644
index 0000000..f315cdf
--- /dev/null
+++ b/src/targeting_flags.c
@@ -0,0 +1,16 @@
+#include "global.h"
+#include "targeting_flags.h"
+
+#include "constants/move_id.h"
+#include "constants/type.h"
+#include "dungeon_pokemon_attributes.h"
+#include "moves.h"
+
+s16 GetMoveTargetingFlagsForPokemon(struct DungeonEntity *pokemon, struct PokemonMove *move, u32 isAI)
+{
+ if (move->moveID == MOVE_CURSE && !isAI && !HasType(pokemon, TYPE_GHOST))
+ {
+ return TARGETING_FLAG_BOOST_SELF | TARGETING_FLAG_TARGET_SELF;
+ }
+ return GetMoveTargetingFlags(move, isAI);
+}