mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Add Prof. Oak post-game fight
This was surprisingly easy to add, albeit a bit awkward. I learned how to add trainer battles without headers this way, so I may go back to CeladonU and restructure with this in mind. This commit adds a fully functioning Professor Oak fight, using the Rival party choice script as a launchpad. You can desynchronise the choices easily, just a few number changes. I used the S. S. Anne 2F and Route 22 scripts to hodgepodge it together. Because of how I did this, Oak is fully re-fightable, taking inspiration from XY Serena's daily re-fights. I tried to add a Yes/No prompt, but it would still pull you into the fight, presumably because it's calling a beforebattle script before the code. It's a bit of a hassle and my CeladonU code sucked, so I decided to leave it out for now. It's intended to be unlocked once you enter the Hall of Fame, thus that change there. That hasn't been tested properly so uhhhh *shrug*
This commit is contained in:
parent
79110d859d
commit
d31edda1da
8 changed files with 144 additions and 6 deletions
|
|
@ -97,6 +97,9 @@ HallofFameRoomScript1:
|
|||
ld a, HS_CERULEAN_CAVE_GUY
|
||||
ld [wMissableObjectIndex], a
|
||||
predef HideObject
|
||||
ld a, HS_ROUTE_1_OAK
|
||||
ld [wMissableObjectIndex], a
|
||||
predef ShowObject
|
||||
ld a, $2
|
||||
ld [wHallOfFameCurScript], a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
Route1_Script:
|
||||
jp EnableAutoTextBoxDrawing
|
||||
ld hl, Route1_ScriptPointers
|
||||
ld a, [wRoute1CurScript]
|
||||
jp CallFunctionInTable
|
||||
|
||||
Route1_TextPointers:
|
||||
dw Route1Text1
|
||||
dw Route1Text2
|
||||
dw Route1Text3
|
||||
dw Route1OakText
|
||||
|
||||
Route1Text1:
|
||||
text_asm
|
||||
|
|
@ -50,3 +54,80 @@ Route1Text2:
|
|||
Route1Text3:
|
||||
text_far _Route1Text3
|
||||
text_end
|
||||
|
||||
; oak stuff begins here
|
||||
|
||||
; text
|
||||
Route1OakText:
|
||||
text_asm
|
||||
ld hl, OakBeforeBattleText
|
||||
call PrintText
|
||||
|
||||
; call YesNoChoice ; this whole bit doesn't work for some reason
|
||||
; ld a, [wCurrentMenuItem]
|
||||
; and a
|
||||
; ld hl, OakYes
|
||||
; jr nz, .got_text
|
||||
; ld hl, OakNo
|
||||
;.got_text
|
||||
|
||||
ld hl, wd72d
|
||||
set 6, [hl]
|
||||
set 7, [hl]
|
||||
|
||||
call Delay3
|
||||
ld a, OPP_PROF_OAK
|
||||
ld [wCurOpponent], a
|
||||
|
||||
; select which team to use during the encounter
|
||||
ld a, [wRivalStarter]
|
||||
cp STARTER2
|
||||
jr nz, .NotSquirtle
|
||||
ld a, $3
|
||||
jr .done
|
||||
.NotSquirtle
|
||||
cp STARTER3
|
||||
jr nz, .Charmander
|
||||
ld a, $1
|
||||
jr .done
|
||||
.Charmander
|
||||
ld a, $2
|
||||
.done
|
||||
ld [wTrainerNo], a
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
|
||||
ld a, $2
|
||||
ld [wRoute1CurScript], a
|
||||
|
||||
ld hl, OakDefeatedText
|
||||
ld de, OakWonText
|
||||
call SaveEndBattleTextPointers
|
||||
jp TextScriptEnd
|
||||
|
||||
OakBeforeBattleText:
|
||||
text_far _OakBeforeBattleText
|
||||
text_end
|
||||
|
||||
OakDefeatedText:
|
||||
text_far _OakDefeatedText
|
||||
text_end
|
||||
|
||||
OakWonText:
|
||||
text_far _OakWonText
|
||||
text_end
|
||||
|
||||
OakYes:
|
||||
text_far _OakYes
|
||||
text_end
|
||||
|
||||
OakNo:
|
||||
text_far _OakNo
|
||||
text_end
|
||||
|
||||
; useful thing
|
||||
StarterMons_Oak:
|
||||
; starter the rival picked, oak trainer number. way easier than storing oak's "choice"
|
||||
db STARTER1, 2 ; Venusaur
|
||||
db STARTER2, 3 ; Charizard
|
||||
db STARTER3, 1 ; Totartle
|
||||
Loading…
Add table
Add a link
Reference in a new issue