R/B: Battle Test Debug Function
Posted by: Stackout
Date: 2014-07-29 03:56:02
TestBattle:
ret
.loop
call GBPalNormal
; Don't mess around
; with obedience.
ld a, %10000000 ; EARTHBADGE
ld [W_OBTAINEDBADGES], a
ld hl, W_FLAGS_D733
set 0, [hl]
; Reset the party.
ld hl, wPartyCount
xor a
ld [hli], a
dec a
ld [hl], a
; Give the player a
; level 20 Rhydon.
ld a, RHYDON
ld [wcf91], a
ld a, 20
ld [W_CURENEMYLVL], a
xor a
ld [wcc49], a
ld [W_CURMAP], a
call AddPartyMon
; Fight against a
; level 20 Rhydon.
ld a, RHYDON
ld [W_CUROPPONENT], a
predef InitOpponent
; When the battle ends,
; do it all again.
ld a, 1
ld [wcfcb], a
ld [H_AUTOBGTRANSFERENABLED], a
jr .loop
I think the comments are enough to explain this one.
The actual function start (after the ret) is at 1:4da6. So here's 8F code for it!
ld c,$01
ld h,$4d
ld l,$a6
ld b,c
ld b,b
call $35d6
ret
[tt]0e 01 26 4d 2e a6 41 40 cd d6 35 c9[/tt]
[tt]Awakening x 1
Carbos x77
X Accuracy x166
X Attack x 64
TM05 x214
Revive x201[/tt]