summaryrefslogtreecommitdiff
path: root/include/battle.h
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-11 20:49:56 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-10-12 01:14:17 -0400
commitb0598b1aef16815272187adf84a999b6f190c8ba (patch)
treef553592609a866b428822bf72ebf909533e10296 /include/battle.h
parentf23e0beebac9aa983620c024d691690fedc4e784 (diff)
Clean up recorded_battle, add MOVE_IS_PERMANENT
Diffstat (limited to 'include/battle.h')
-rw-r--r--include/battle.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/battle.h b/include/battle.h
index 5ccff8ce3..f793c779f 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -17,6 +17,11 @@
#define GET_BATTLER_SIDE(battler) (GetBattlerPosition(battler) & BIT_SIDE)
#define GET_BATTLER_SIDE2(battler) (GET_BATTLER_POSITION(battler) & BIT_SIDE)
+// Used to exclude moves learned temporarily by Transform or Mimic
+#define MOVE_IS_PERMANENT(battler, moveSlot) \
+ (!(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) \
+ && !(gDisableStructs[battler].mimickedMoves & gBitTable[moveSlot]))
+
// Battle Actions
// These determine what each battler will do in a turn
#define B_ACTION_USE_MOVE 0