Named a test battle variable

This commit is contained in:
YamaArashi 2015-08-13 19:13:47 -07:00
parent 0750db0d72
commit f6d618090a
4 changed files with 16 additions and 7 deletions

View File

@ -164,6 +164,9 @@ HP_BAR_GREEN EQU 0
HP_BAR_YELLOW EQU 1
HP_BAR_RED EQU 2
; D733 flags
BIT_TEST_BATTLE EQU 0
; serial
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01

View File

@ -2634,7 +2634,7 @@ MoveSelectionMenu: ; 3d219 (f:5219)
cp LINK_STATE_BATTLING
jr z, .matchedkeyspicked
ld a, [W_FLAGS_D733]
bit 0, a
bit BIT_TEST_BATTLE, a
ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON | SELECT
jr z, .matchedkeyspicked
ld b, $ff
@ -2662,7 +2662,7 @@ SelectMenuItem: ; 3d2fe (f:52fe)
jr .select
.battleselect
ld a, [W_FLAGS_D733]
bit 0, a
bit BIT_TEST_BATTLE, a
jr nz, .select
call PrintMenuItem
ld a, [wMenuItemToSwap]
@ -6170,8 +6170,8 @@ GetCurrentMove: ; 3eabe (f:6abe)
.player
ld de, W_PLAYERMOVENUM
ld a, [W_FLAGS_D733]
bit 0, a
ld a, [wccd9]
bit BIT_TEST_BATTLE, a
ld a, [wTestBattlePlayerSelectedMove]
jr nz, .selected
ld a, [wPlayerSelectedMove]
.selected

View File

@ -25,8 +25,8 @@ InitBattleVariables: ; 525af (14:65af)
ld [hli], a
dec b
jr nz, .loop
inc a
ld [wccd9], a
inc a ; POUND
ld [wTestBattlePlayerSelectedMove], a
ld a, [W_CURMAP]
cp SAFARI_ZONE_EAST
jr c, .notSafariBattle

View File

@ -577,7 +577,12 @@ wPlayerSubstituteHP:: ; ccd7
wEnemySubstituteHP:: ; ccd8
ds 1
wccd9:: ds 2 ; used in InitBattleVariablesLoop (written to after the loop is finished)
wTestBattlePlayerSelectedMove:: ; ccd9
; The player's selected move during a test battle.
; InitBattleVariables sets it to the move Pound.
ds 1
ds 1
wMoveMenuType:: ; ccdb
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
@ -2951,6 +2956,7 @@ wd732:: ; d732
ds 1
W_FLAGS_D733:: ; d733
; bit 0: running a test battle
; bit 4: use variable [W_CURMAPSCRIPT] instead of the provided index for next frame's map script (used to start battle when talking to trainers)
; bit 7: used fly out of battle
ds 1