summaryrefslogtreecommitdiff
path: root/src/contest_effect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/contest_effect.c')
-rw-r--r--src/contest_effect.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/contest_effect.c b/src/contest_effect.c
new file mode 100644
index 000000000..f1606517b
--- /dev/null
+++ b/src/contest_effect.c
@@ -0,0 +1,33 @@
+#include "global.h"
+#include "ewram.h"
+#include "contest.h"
+
+extern bool8 const gComboStarterLookupTable[];
+
+bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove) {
+ u8 nextMoveComboMoves[4];
+ u8 lastMoveComboStarterId = gContestMoves[lastMove].comboStarterId;
+ nextMoveComboMoves[0] = gContestMoves[nextMove].comboMoves[0];
+ nextMoveComboMoves[1] = gContestMoves[nextMove].comboMoves[1];
+ nextMoveComboMoves[2] = gContestMoves[nextMove].comboMoves[2];
+ nextMoveComboMoves[3] = gContestMoves[nextMove].comboMoves[3];
+
+ if (lastMoveComboStarterId == 0)
+ return 0;
+
+ if (lastMoveComboStarterId == nextMoveComboMoves[0] || lastMoveComboStarterId == nextMoveComboMoves[1] || lastMoveComboStarterId == nextMoveComboMoves[2] || lastMoveComboStarterId == nextMoveComboMoves[3])
+ return gComboStarterLookupTable[lastMoveComboStarterId];
+
+ return 0;
+}
+
+void ContestEffect_00(void)
+{
+}
+
+void ContestEffect_01(void)
+{
+ sContestantStatus[shared192D0.unk11].unk10_2 = TRUE;
+ sub_80B13EC(shared192D0.unk11, 0);
+}
+