diff options
author | yenatch <yenatch@gmail.com> | 2017-12-28 01:30:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-28 01:30:36 -0500 |
commit | da28d1a84b0499bead314e17ae2ff0d13eb03196 (patch) | |
tree | c212adfc53d1996c06f2e4be1d6e480e687a2ad8 /engine/events/catch_tutorial.asm | |
parent | bad9e33530af8cdc29ce5629df682fc7915bfff0 (diff) | |
parent | 2c4777f3363cd64d05fb00084fd83dff8ac31674 (diff) |
Merge pull request #437 from roukaour/master
Reorganize battle/; rename most "header" misnomers; gfx/pics → gfx/pokemon
Diffstat (limited to 'engine/events/catch_tutorial.asm')
-rw-r--r-- | engine/events/catch_tutorial.asm | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm new file mode 100644 index 000000000..b9352ccd6 --- /dev/null +++ b/engine/events/catch_tutorial.asm @@ -0,0 +1,81 @@ +CatchTutorial:: ; 4e554 + ld a, [BattleType] + 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 + +.dw ; 4e564 (13:6564) + dw .DudeTutorial + dw .DudeTutorial + dw .DudeTutorial + +.DudeTutorial: ; 4e56a (13:656a) +; Back up your name to your Mom's name. + ld hl, PlayerName + ld de, MomsName + ld bc, NAME_LENGTH + call CopyBytes +; Copy Dude's name to your name + ld hl, .Dude + ld de, PlayerName + ld bc, NAME_LENGTH + call CopyBytes + + call .LoadDudeData + + xor a + ld [hJoyDown], a + ld [hJoyPressed], a + ld a, [Options] + push af + and $f8 + add $3 + ld [Options], a + ld hl, .AutoInput + ld a, BANK(.AutoInput) + call StartAutoInput + callfar StartBattle + call StopAutoInput + pop af + + ld [Options], a + ld hl, MomsName + ld de, PlayerName + ld bc, NAME_LENGTH + call CopyBytes + ret + +.LoadDudeData: ; 4e5b7 (13:65b7) + 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 + ld a, POKE_BALL ; 5 + ld [hli], a + ld [hli], a + ld [hl], -1 + ret + +.Dude: ; 4e5da + db "DUDE@" + +.AutoInput: ; 4e5df + db NO_INPUT, $ff ; end |