summaryrefslogtreecommitdiff
path: root/src/dungeon_action.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-01-20 15:26:19 -0800
committerGitHub <noreply@github.com>2022-01-20 15:26:19 -0800
commit408fe77d7b9440d7eb5d46eda5f920572d516d67 (patch)
tree38953616b74da130bd832635bed1c605d4b0e322 /src/dungeon_action.c
parent3cdde2a92a187d437dc7d24273177b59ab5b9511 (diff)
parentc5cd6e137fbad180a21ec24a50fde76633db0c20 (diff)
Merge pull request #93 from AnonymousRandomPerson/master
More AI decomp
Diffstat (limited to 'src/dungeon_action.c')
-rw-r--r--src/dungeon_action.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dungeon_action.c b/src/dungeon_action.c
index 6d8fcb3..9034e4c 100644
--- a/src/dungeon_action.c
+++ b/src/dungeon_action.c
@@ -1,6 +1,9 @@
#include "global.h"
#include "dungeon_action.h"
+
+#include "constants/dungeon_action.h"
#include "dungeon_entity.h"
+#include "pokemon.h"
void SetAction(struct DungeonActionContainer *actionPointer, u16 action)
{
@@ -8,3 +11,17 @@ void SetAction(struct DungeonActionContainer *actionPointer, u16 action)
actionPointer->actionUseIndex = 0;
actionPointer->unkC = 0;
}
+
+void SetWalkAction(struct DungeonActionContainer *actionPointer, s16 species)
+{
+ if (GetIsMoving(species))
+ {
+ actionPointer->action = DUNGEON_ACTION_WALK;
+ }
+ else
+ {
+ actionPointer->action = DUNGEON_ACTION_WAIT;
+ }
+ actionPointer->actionUseIndex = 0;
+ actionPointer->unkC = 0;
+}