Add a CANNOT_MOVE
constant (#1182)
This commit is contained in:
@@ -259,6 +259,8 @@
|
|||||||
const BEAT_UP ; fb
|
const BEAT_UP ; fb
|
||||||
DEF NUM_ATTACKS EQU const_value - 1
|
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
|
; Battle animations use the same constants as the moves up to this point
|
||||||
const_next $ff
|
const_next $ff
|
||||||
const ANIM_SWEET_SCENT_2 ; ff
|
const ANIM_SWEET_SCENT_2 ; ff
|
||||||
|
@@ -4175,7 +4175,7 @@ PursuitSwitch:
|
|||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
ld a, $ff
|
ld a, CANNOT_MOVE
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
|
@@ -111,9 +111,9 @@ CheckTurn:
|
|||||||
BattleCommand_CheckTurn:
|
BattleCommand_CheckTurn:
|
||||||
; Repurposed as hardcoded turn handling. Useless as a command.
|
; Repurposed as hardcoded turn handling. Useless as a command.
|
||||||
|
|
||||||
; Move $ff immediately ends the turn.
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
|
assert CANNOT_MOVE == $ff
|
||||||
inc a
|
inc a
|
||||||
jp z, EndTurn
|
jp z, EndTurn
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user