From fd2af282b61cdc40c20e1a4e99da6d9939be8257 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Sat, 31 May 2025 15:07:34 -0400 Subject: [PATCH] Add a `CANNOT_MOVE` constant (#1182) --- constants/move_constants.asm | 2 ++ engine/battle/core.asm | 2 +- engine/battle/effect_commands.asm | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/constants/move_constants.asm b/constants/move_constants.asm index 6112966cb..6e79b2e4b 100644 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -259,6 +259,8 @@ const BEAT_UP ; fb DEF NUM_ATTACKS EQU const_value - 1 +DEF CANNOT_MOVE EQU $ff + ; Battle animations use the same constants as the moves up to this point const_next $ff const ANIM_SWEET_SCENT_2 ; ff diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 45a1bb57a..f70caab92 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -4175,7 +4175,7 @@ PursuitSwitch: ld a, BATTLE_VARS_MOVE call GetBattleVarAddr - ld a, $ff + ld a, CANNOT_MOVE ld [hl], a pop af diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 39019fb40..3ad991425 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -111,9 +111,9 @@ CheckTurn: BattleCommand_CheckTurn: ; Repurposed as hardcoded turn handling. Useless as a command. -; Move $ff immediately ends the turn. ld a, BATTLE_VARS_MOVE call GetBattleVar + assert CANNOT_MOVE == $ff inc a jp z, EndTurn