2018-06-24 07:09:41 -07:00
|
|
|
CatchTutorial::
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wBattleType]
|
2017-12-15 17:10:54 -08:00
|
|
|
dec a
|
|
|
|
ld c, a
|
|
|
|
ld hl, .dw
|
|
|
|
ld b, 0
|
|
|
|
add hl, bc
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
jp hl
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.dw
|
2017-12-15 17:10:54 -08:00
|
|
|
dw .DudeTutorial
|
|
|
|
dw .DudeTutorial
|
|
|
|
dw .DudeTutorial
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.DudeTutorial:
|
2017-12-15 17:10:54 -08:00
|
|
|
; Back up your name to your Mom's name.
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPlayerName
|
|
|
|
ld de, wMomsName
|
2017-12-15 17:10:54 -08:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
; Copy Dude's name to your name
|
|
|
|
ld hl, .Dude
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wPlayerName
|
2017-12-15 17:10:54 -08:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
call .LoadDudeData
|
|
|
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hJoyDown], a
|
|
|
|
ldh [hJoyPressed], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wOptions]
|
2017-12-15 17:10:54 -08:00
|
|
|
push af
|
2019-02-16 12:45:55 -08:00
|
|
|
and $ff ^ TEXT_DELAY_MASK
|
|
|
|
add TEXT_DELAY_MED
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wOptions], a
|
2017-12-15 17:10:54 -08:00
|
|
|
ld hl, .AutoInput
|
|
|
|
ld a, BANK(.AutoInput)
|
|
|
|
call StartAutoInput
|
2017-12-24 09:47:30 -08:00
|
|
|
callfar StartBattle
|
2017-12-15 17:10:54 -08:00
|
|
|
call StopAutoInput
|
|
|
|
pop af
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wOptions], a
|
|
|
|
ld hl, wMomsName
|
|
|
|
ld de, wPlayerName
|
2017-12-15 17:10:54 -08:00
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
call CopyBytes
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.LoadDudeData:
|
2017-12-15 17:10:54 -08:00
|
|
|
ld hl, wDudeNumItems
|
|
|
|
ld [hl], 1
|
|
|
|
inc hl
|
|
|
|
ld [hl], POTION
|
|
|
|
inc hl
|
|
|
|
ld [hl], 1
|
|
|
|
inc hl
|
|
|
|
ld [hl], -1
|
|
|
|
ld hl, wDudeNumKeyItems
|
|
|
|
ld [hl], 0
|
|
|
|
inc hl
|
|
|
|
ld [hl], -1
|
|
|
|
ld hl, wDudeNumBalls
|
|
|
|
ld a, 1
|
|
|
|
ld [hli], a
|
2018-06-24 07:09:41 -07:00
|
|
|
ld a, POKE_BALL
|
2017-12-15 17:10:54 -08:00
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], -1
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.Dude:
|
2017-12-15 17:10:54 -08:00
|
|
|
db "DUDE@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.AutoInput:
|
2017-12-15 17:10:54 -08:00
|
|
|
db NO_INPUT, $ff ; end
|