Gym Leader Rematches!

This commit adds a large fundamental change to KEP, that being Gym Rematches.

This is achieved alongside a rework to the script that makes those post-game-gating NPCs shift around. If you add a new one, just add its constant to the lists you'll see in the Hall of Fame script.

It also fixes a few bugs:
- Fixed a bug where Cinnabar Gym loaded a fleet of Blaines. This occurred due to the way he is coded at base, and a misunderstanding I had when implementing his scaling. This is now fixed by standardising his gym script instead, while letting the gym trainers still use the old one.
- Fixed a bug where the Up-Grade NPC would not appear after beating Silph Co. 11F. However, Giovanni currently seems to have trouble with his text. This floor needs some re-coding anyway, given we need to add Jessie and James to it.

And some misc. changes:
- Changed the first Moon Stone in Mt. Moon to a Poison Stone for the Nidoking speedrunners
- Debug Mode now has a line of code to set up the post-game easily
- Changed Surge's initial battle text to Yellow's
- Added Sabrina's more accurate LGPE initial battle text, referring to the spoon she bent by accident
This commit is contained in:
Llinos Evans 2023-06-09 11:17:31 +01:00
parent 5f8250f0d1
commit 749abc67b7
24 changed files with 575 additions and 67 deletions

View file

@ -831,7 +831,7 @@ DEF INDIGO_PLATEAU_EVENTS_END EQU const_value - 1
; Victory Road 1F events ; Victory Road 1F events
const_next $910 const_next $910
const_skip const EVENT_POST_GAME_ATTAINED ; Used for Gym Leader rematches, among other things.
const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0
const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1
const_skip 4 const_skip 4

View file

@ -20,7 +20,7 @@ MtMoon1F_Object:
object_event 7, 22, SPRITE_YOUNGSTER, STAY, DOWN, 6, OPP_BUG_CATCHER, 7 object_event 7, 22, SPRITE_YOUNGSTER, STAY, DOWN, 6, OPP_BUG_CATCHER, 7
object_event 30, 27, SPRITE_YOUNGSTER, STAY, RIGHT, 7, OPP_BUG_CATCHER, 8 object_event 30, 27, SPRITE_YOUNGSTER, STAY, RIGHT, 7, OPP_BUG_CATCHER, 8
object_event 2, 20, SPRITE_POKE_BALL, STAY, NONE, 8, POTION object_event 2, 20, SPRITE_POKE_BALL, STAY, NONE, 8, POTION
object_event 2, 2, SPRITE_POKE_BALL, STAY, NONE, 9, MOON_STONE object_event 2, 2, SPRITE_POKE_BALL, STAY, NONE, 9, POISON_STONE
object_event 35, 31, SPRITE_POKE_BALL, STAY, NONE, 10, RARE_CANDY object_event 35, 31, SPRITE_POKE_BALL, STAY, NONE, 10, RARE_CANDY
object_event 36, 23, SPRITE_POKE_BALL, STAY, NONE, 11, ESCAPE_ROPE object_event 36, 23, SPRITE_POKE_BALL, STAY, NONE, 11, ESCAPE_ROPE
object_event 20, 33, SPRITE_POKE_BALL, STAY, NONE, 12, POTION object_event 20, 33, SPRITE_POKE_BALL, STAY, NONE, 12, POTION

View file

@ -7,7 +7,8 @@ RedsHouse2F_Object:
;warp_event 5, 1, SILPH_CO_11F, 1 ; - Test Omega & Giovanni ;warp_event 5, 1, SILPH_CO_11F, 1 ; - Test Omega & Giovanni
;warp_event 5, 1, ROCKET_HIDEOUT_B4F, 2 ; - Test Giovanni 1 ;warp_event 5, 1, ROCKET_HIDEOUT_B4F, 2 ; - Test Giovanni 1
;warp_event 5, 1, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater ;warp_event 5, 1, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater
warp_event 5, 1, CELESTE_HILL, 2 ; - Test Birds ;warp_event 5, 1, CELESTE_HILL, 2 ; - Test Birds
warp_event 5, 1, INDIGO_PLATEAU_LOBBY, 1 ; easy league access
def_bg_events def_bg_events

View file

@ -1,6 +1,10 @@
SaffronGym_Object: SaffronGym_Object:
db $2e ; border block db $2e ; border block
; I tried to add a way to instantly get to the start.
; But...it breaks the *entire* puzzle for some reason.
; Yes, I tried changing the one in Sabrina's room. No, it didn't accomplish anything.
def_warp_events def_warp_events
warp_event 8, 17, LAST_MAP, 3 warp_event 8, 17, LAST_MAP, 3
warp_event 9, 17, LAST_MAP, 3 warp_event 9, 17, LAST_MAP, 3
@ -34,6 +38,7 @@ SaffronGym_Object:
warp_event 19, 15, SAFFRON_GYM, 26 warp_event 19, 15, SAFFRON_GYM, 26
warp_event 15, 17, SAFFRON_GYM, 12 warp_event 15, 17, SAFFRON_GYM, 12
warp_event 19, 17, SAFFRON_GYM, 20 warp_event 19, 17, SAFFRON_GYM, 20
;warp_event 10, 8, SAFFRON_GYM, 20 ; New warp directly to the start of the gym, like later games.
def_bg_events def_bg_events

View file

@ -56,6 +56,9 @@ IF DEF(_DEBUG)
ld a, MEOWTH ld a, MEOWTH
ld [wBeautyChoice], a ld [wBeautyChoice], a
; Test Post-Game Functionality.
SetEvent EVENT_POST_GAME_ATTAINED
; Get all badges except Earth Badge. ; Get all badges except Earth Badge.
ld a, ~(1 << BIT_EARTHBADGE) ld a, ~(1 << BIT_EARTHBADGE)
ld [wObtainedBadges], a ld [wObtainedBadges], a
@ -180,6 +183,7 @@ DebugItemsList:
db FULL_RESTORE, 99 db FULL_RESTORE, 99
db MAX_REPEL, 99 db MAX_REPEL, 99
db RARE_CANDY, 99 db RARE_CANDY, 99
db ESCAPE_ROPE, 99
db POKE_BALL, 99 ; test ball miss text with this db POKE_BALL, 99 ; test ball miss text with this
db SECRET_KEY, 1 db SECRET_KEY, 1
db CARD_KEY, 1 db CARD_KEY, 1

View file

@ -103,12 +103,37 @@ CeladonGymTrainerHeader6:
ErikaText: ErikaText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_ERIKA CheckEvent EVENT_BEAT_ERIKA
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM21 CheckEventReuseA EVENT_GOT_TM21
jr nz, .afterBeat jr nz, .afterBeat
call z, CeladonGymReceiveTM21 call z, CeladonGymReceiveTM21
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, ErikaRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, ErikaRematchDefeatedText
ld de, ErikaRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_ERIKA
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $4
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, ErikaPostBattleAdviceText ld hl, ErikaPostBattleAdviceText
@ -303,3 +328,11 @@ CeladonGymEndBattleText8:
CeladonGymAfterBattleText8: CeladonGymAfterBattleText8:
text_far _CeladonGymAfterBattleText8 text_far _CeladonGymAfterBattleText8
text_end text_end
ErikaRematchPreBattleText:
text_far _ErikaRematchPreBattleText
text_end
ErikaRematchDefeatedText:
text_far _ErikaRematchDefeatedText
text_end

View file

@ -89,12 +89,37 @@ CeruleanGymTrainerHeader1:
MistyText: MistyText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_MISTY CheckEvent EVENT_BEAT_MISTY
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM11 CheckEventReuseA EVENT_GOT_TM11
jr nz, .afterBeat jr nz, .afterBeat
call z, CeruleanGymReceiveTM11 call z, CeruleanGymReceiveTM11
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done
.rematchMode ; Rematch functionality. Just loads pre-battle text and her trainer.
ld hl, MistyRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, MistyRematchDefeatedText
ld de, MistyRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_MISTY
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $2
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, TM11ExplanationText ld hl, TM11ExplanationText
@ -222,3 +247,11 @@ CeruleanGymGuidePreBattleText:
CeruleanGymGuidePostBattleText: CeruleanGymGuidePostBattleText:
text_far _CeruleanGymGuidePostBattleText text_far _CeruleanGymGuidePostBattleText
text_end text_end
MistyRematchPreBattleText:
text_far _MistyRematchPreBattleText
text_end
MistyRematchDefeatedText:
text_far _MistyRematchDefeatedText
text_end

View file

@ -191,24 +191,7 @@ CinnabarGymScript_758b7:
ldh a, [hSpriteIndexOrTextID] ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
; call InitBattleEnemyParameters ; put this back if you mess up call InitBattleEnemyParameters
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_BLAINE
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld hl, wd72d ld hl, wd72d
set 6, [hl] set 6, [hl]
set 7, [hl] set 7, [hl]
@ -224,15 +207,41 @@ CinnabarGymScript_758b7:
ld [wCurMapScript], a ld [wCurMapScript], a
jp TextScriptEnd jp TextScriptEnd
; Blaine's gym script has been standardised for gym scaling purposes.
BlaineText: BlaineText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_BLAINE CheckEvent EVENT_BEAT_BLAINE
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM38 CheckEventReuseA EVENT_GOT_TM38
jr nz, .afterBeat jr nz, .afterBeat
call z, CinnabarGymReceiveTM38 call z, CinnabarGymReceiveTM38
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp TextScriptEnd jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, BlaineRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, BlaineRematchDefeatedText
ld de, BlaineRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_BLAINE
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $7
ld [wGymLeaderNo], a
jr .done
.afterBeat .afterBeat
ld hl, BlainePostBattleAdviceText ld hl, BlainePostBattleAdviceText
call PrintText call PrintText
@ -243,9 +252,37 @@ BlaineText:
ld hl, ReceivedVolcanoBadgeText ld hl, ReceivedVolcanoBadgeText
ld de, ReceivedVolcanoBadgeText ld de, ReceivedVolcanoBadgeText
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld hl, wd72d
set 6, [hl]
set 7, [hl]
ld a, [wSpriteIndex]
call EngageMapTrainer
ld a, OPP_BLAINE
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $7 ld a, $7
ld [wGymLeaderNo], a ld [wGymLeaderNo], a
jp CinnabarGymScript_758b7
;ends here
ld a, $3
ld [wCinnabarGymCurScript], a
ld [wCurMapScript], a
jr .done
.done
jp TextScriptEnd
BlainePreBattleText: BlainePreBattleText:
text_far _BlainePreBattleText text_far _BlainePreBattleText
@ -490,3 +527,11 @@ CinnabarGymGuidePreBattleText:
CinnabarGymGuidePostBattleText: CinnabarGymGuidePostBattleText:
text_far _CinnabarGymGuidePostBattleText text_far _CinnabarGymGuidePostBattleText
text_end text_end
BlaineRematchPreBattleText:
text_far _BlaineRematchPreBattleText
text_end
BlaineRematchDefeatedText:
text_far _BlaineRematchDefeatedText
text_end

View file

@ -103,12 +103,37 @@ FuchsiaGymTrainerHeader5:
KogaText: KogaText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_KOGA CheckEvent EVENT_BEAT_KOGA
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM06 CheckEventReuseA EVENT_GOT_TM06
jr nz, .afterBeat jr nz, .afterBeat
call z, FuchsiaGymReceiveTM06 call z, FuchsiaGymReceiveTM06
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, KogaRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, KogaRematchDefeatedText
ld de, KogaRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_KOGA
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $5
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, KogaPostBattleAdviceText ld hl, KogaPostBattleAdviceText
@ -306,3 +331,12 @@ FuchsiaGymGuidePreBattleText:
FuchsiaGymGuidePostBattleText: FuchsiaGymGuidePostBattleText:
text_far _FuchsiaGymGuidePostBattleText text_far _FuchsiaGymGuidePostBattleText
text_end text_end
KogaRematchPreBattleText:
text_far _KogaRematchPreBattleText
text_end
KogaRematchDefeatedText:
text_far _KogaRematchDefeatedText
text_end

View file

@ -93,28 +93,10 @@ HallofFameRoomScript1:
ldh [hSpriteIndexOrTextID], a ldh [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wJoyIgnore], a ; TODO: Make this less awful. See: Giovanni in Silph ld [wJoyIgnore], a
ld a, HS_CERULEAN_CAVE_GUY
ld [wMissableObjectIndex], a call PostGameSetup
predef HideObject
ld a, HS_MT_MOON_CRATER_GUARD
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_ROUTE_1_OAK
ld [wMissableObjectIndex], a
predef ShowObject
ld a, HS_BILLS_NIDORINO
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_MANSION_GUARD
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_YUJIROU
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_YUJIROU_REMATCH
ld [wMissableObjectIndex], a
predef ShowObject
ld a, $2 ld a, $2
ld [wHallOfFameCurScript], a ld [wHallOfFameCurScript], a
ret ret
@ -125,3 +107,43 @@ HallOfFame_TextPointers:
HallofFameRoomText1: HallofFameRoomText1:
text_far _HallofFameRoomText1 text_far _HallofFameRoomText1
text_end text_end
; Post-Game Functionality
; This script is adapted from the Silph Co. 11F script that reforms Saffron City.
; It replaces the Cerulean Cave Guard bit, adapting him into the whole ordeal.
PostGameSetup:
SetEvent EVENT_POST_GAME_ATTAINED
ld hl, ObjectsToHide
.loop1
ld a, [hli]
cp $ff
jr z, .skip
push hl
ld [wMissableObjectIndex], a
predef HideObject
pop hl
jr .loop1
.skip
ld hl, ObjectsToShow
.loop2
ld a, [hli]
cp -1
ret z
push hl
ld [wMissableObjectIndex], a
predef ShowObject
pop hl
jr .loop2
ObjectsToShow:
db HS_ROUTE_1_OAK ; Oak post-game fight
db HS_YUJIROU_REMATCH ; Yujirou rematch
db -1 ; end
ObjectsToHide:
db HS_BILLS_NIDORINO ; Bill's Garden access
db HS_MANSION_GUARD ; Pokemon Mansion basement access
db HS_MT_MOON_CRATER_GUARD ; Mt. Moon Crater access
db HS_CERULEAN_CAVE_GUY ; Cerulean Cave access
db -1 ; end

View file

@ -95,12 +95,37 @@ PewterGymTrainerHeader0:
BrockText: BrockText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_BROCK CheckEvent EVENT_BEAT_BROCK
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM34 CheckEventReuseA EVENT_GOT_TM34
jr nz, .afterBeat jr nz, .afterBeat
call z, PewterGymScriptReceiveTM34 call z, PewterGymScriptReceiveTM34
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, BrockRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, BrockRematchDefeatedText
ld de, BrockRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_BROCK
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $1
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, BrockPostBattleAdviceText ld hl, BrockPostBattleAdviceText
@ -238,3 +263,11 @@ PewterGymText_5c524:
PewterGymGuidePostBattleText: PewterGymGuidePostBattleText:
text_far _PewterGymGuidePostBattleText text_far _PewterGymGuidePostBattleText
text_end text_end
BrockRematchPreBattleText:
text_far _BrockRematchPreBattleText
text_end
BrockRematchDefeatedText:
text_far _BrockRematchDefeatedText
text_end

View file

@ -104,12 +104,37 @@ SaffronGymTrainerHeader6:
SabrinaText: SabrinaText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_SABRINA CheckEvent EVENT_BEAT_SABRINA
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM46 CheckEventReuseA EVENT_GOT_TM46
jr nz, .afterBeat jr nz, .afterBeat
call z, SaffronGymReceiveTM46 call z, SaffronGymReceiveTM46
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and her trainer.
ld hl, SabrinaRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, SabrinaRematchDefeatedText
ld de, SabrinaRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_SABRINA
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $6
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, SabrinaPostBattleAdviceText ld hl, SabrinaPostBattleAdviceText
@ -326,3 +351,11 @@ SaffronGymEndBattleText7:
SaffronGymAfterBattleText7: SaffronGymAfterBattleText7:
text_far _SaffronGymAfterBattleText7 text_far _SaffronGymAfterBattleText7
text_end text_end
SabrinaRematchPreBattleText:
text_far _SabrinaRematchPreBattleText
text_end
SabrinaRematchDefeatedText:
text_far _SabrinaRematchDefeatedText
text_end

View file

@ -186,6 +186,7 @@ MissableObjectIDs_62194:
db HS_SAFFRON_CITY_B db HS_SAFFRON_CITY_B
db HS_SAFFRON_CITY_C db HS_SAFFRON_CITY_C
db HS_SAFFRON_CITY_D db HS_SAFFRON_CITY_D
db HS_SAFFRON_CITY_UP_GRADE
db -1 ; end db -1 ; end
MissableObjectIDs_6219b: MissableObjectIDs_6219b:
@ -198,7 +199,6 @@ MissableObjectIDs_6219b:
db HS_SAFFRON_CITY_7 db HS_SAFFRON_CITY_7
db HS_SAFFRON_CITY_E db HS_SAFFRON_CITY_E
db HS_SAFFRON_CITY_F db HS_SAFFRON_CITY_F
db HS_SAFFRON_CITY_UP_GRADE
db HS_SILPH_CO_3F_1 db HS_SILPH_CO_3F_1
db HS_SILPH_CO_3F_2 db HS_SILPH_CO_3F_2
db HS_SILPH_CO_4F_1 db HS_SILPH_CO_4F_1

View file

@ -111,12 +111,37 @@ VermilionGymTrainerHeader2:
LTSurgeText: LTSurgeText:
text_asm text_asm
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
jr nz, .rematchMode
CheckEvent EVENT_BEAT_LT_SURGE CheckEvent EVENT_BEAT_LT_SURGE
jr z, .beforeBeat jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM24 CheckEventReuseA EVENT_GOT_TM24
jr nz, .afterBeat jr nz, .afterBeat
call z, VermilionGymReceiveTM24 call z, VermilionGymReceiveTM24
call DisableWaitingAfterTextDisplay call DisableWaitingAfterTextDisplay
jp .done ; needed due to the rematch script length.
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
ld hl, SurgeRematchPreBattleText
call PrintText
ld c, BANK(Music_MeetMaleTrainer)
ld a, MUSIC_MEET_MALE_TRAINER
call PlayMusic
set 6, [hl]
set 7, [hl]
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
ld hl, SurgeRematchDefeatedText
ld de, SurgeRematchDefeatedText
call SaveEndBattleTextPointers
call EngageMapTrainer
ld a, OPP_LT_SURGE
ld [wCurOpponent], a
ld a, 9
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $3
ld [wGymLeaderNo], a
jr .done jr .done
.afterBeat .afterBeat
ld hl, LTSurgePostBattleAdviceText ld hl, LTSurgePostBattleAdviceText
@ -263,3 +288,11 @@ VermilionGymGuidePreBattleText:
VermilionGymGuidePostBattleText: VermilionGymGuidePostBattleText:
text_far _VermilionGymGuidePostBattleText text_far _VermilionGymGuidePostBattleText
text_end text_end
SurgeRematchPreBattleText:
text_far _SurgeRematchPreBattleText
text_end
SurgeRematchDefeatedText:
text_far _SurgeRematchDefeatedText
text_end

View file

@ -215,3 +215,34 @@ _CeladonGymAfterBattleText8::
para "Wait 'til next" para "Wait 'til next"
line "time!" line "time!"
done done
_ErikaRematchPreBattleText::
text "If it isn't the"
line "one filling out"
cont "the #DEX."
para "I do hope things"
line "have been going"
cont "well since our"
cont "last encounter."
para "...I see."
para "You certainly"
line "have been busy."
para "I'm not fond of"
line "those kinds of"
cont "public things..."
para "But battles are"
line "different. That's"
cont "what you came"
cont "for, isn't it?"
done
_ErikaRematchDefeatedText::
text "Oh! It"
line "appears it is"
cont "my loss..."
prompt

View file

@ -124,3 +124,30 @@ _CeruleanGymGuidePostBattleText::
line "we make a pretty" line "we make a pretty"
cont "darn good team!" cont "darn good team!"
done done
_MistyRematchPreBattleText::
text "I heard an"
line "interesting"
cont "rumor!"
para "Not only did you"
line "beat those TEAM"
cont "ROCKET guys, but"
cont "you also became"
cont "the CHAMPION!"
para "I can't take it"
line "anymore! I just"
cont "have to battle"
cont "you again!"
para "You got that?"
para "No refusing!"
done
_MistyRematchDefeatedText::
text "Hmph!"
line "How annoying!"
prompt

View file

@ -208,5 +208,40 @@ _CinnabarGymGuidePreBattleText::
_CinnabarGymGuidePostBattleText:: _CinnabarGymGuidePostBattleText::
text "<PLAYER>! You beat" text "<PLAYER>! You beat"
line "that fire brand!" line "that firebrand!"
done done
_BlaineRematchPreBattleText::
text "Hah! Well done"
line "returning here!"
para "You're the one"
line "who retrieved the"
cont "key from #MON"
cont "MANSION!"
para "Did you see"
line "anything while"
cont "you were in"
cont "there?"
para "That place holds"
line "remnants of my"
cont "old friend's re-"
cont "search!"
para "Hmm..."
para "Well, it's not"
line "as though I know"
cont "the full story."
para "Since you're here"
line "though, let's"
cont "battle!"
done
_BlaineRematchDefeatedText::
text "Hah!"
line "I'm all fired up!"
prompt

View file

@ -24,3 +24,26 @@ _ReceivedSoulBadgeText::
para "Here! Take the" para "Here! Take the"
line "SOULBADGE!" line "SOULBADGE!"
prompt prompt
_KogaRematchPreBattleText::
text "Fwahahaha!"
para "If it isn't the"
line "child."
para "It seems we are"
line "fated to meet"
cont "once again."
para "You have come"
line "at a truly"
cont "opportune time."
para "I wanted to test"
line "my newly refined"
cont "ninja skills..."
para "In a battle that"
line "will end in your"
cont "utter defeat!"
done

View file

@ -192,3 +192,9 @@ _FuchsiaGymGuidePostBattleText::
line "ninja can terrify" line "ninja can terrify"
cont "even now!" cont "even now!"
done done
_KogaRematchDefeatedText::
text "I must"
line "hone my skills."
prompt

View file

@ -16,3 +16,23 @@ _BrockPreBattleText::
cont "Fine then! Show" cont "Fine then! Show"
cont "me your best!" cont "me your best!"
done done
_BrockRematchPreBattleText::
text "You sure look"
line "different to"
cont "when we first"
cont "met!"
para "The truth is..."
para "We LEADERs have"
line "a right to"
cont "challenge the"
cont "champ!"
para "Allow me to show"
line "you the true"
cont "rock-hard power"
cont "of my #MON!"
done

View file

@ -144,3 +144,27 @@ _PewterGymGuidePostBattleText::
line "You're #MON" line "You're #MON"
cont "champ material!" cont "champ material!"
done done
_BrockRematchDefeatedText::
text "I knew"
line "you were strong,"
cont "but this..."
prompt
_BrockRematchPostText::
text "I've chosen to"
line "postpone my"
cont "dream of being"
cont "a #MON"
cont "breeder for a"
cont "little longer."
para "Right now, I'm"
line "more interested"
cont "training to one"
cont "day defeat you!"
para "Battle me again"
line "sometime!"
done

View file

@ -6,9 +6,13 @@ _SabrinaPreBattleText::
line "powers since I" line "powers since I"
cont "was a child." cont "was a child."
para "I first learned" ; LGPE modification. I believe it's a more accurate translation as well.
line "to bend spoons" para "It started when I"
cont "with my mind." line "carelessly threw"
cont "a spoon aside"
cont "and it bent"
cont "itself into an"
cont "unnatural shape."
para "I dislike fight-" para "I dislike fight-"
line "ing, but if you" line "ing, but if you"
@ -224,3 +228,38 @@ _SaffronGymAfterBattleText7::
line "used telepathy to" line "used telepathy to"
cont "read your mind!" cont "read your mind!"
done done
_SabrinaRematchPreBattleText::
text "It is true that"
line "PSI is a potent"
cont "ability."
para "However, after I"
line "lost to you that"
cont "day..."
para "I realised there"
line "are things that"
cont "cannot be over-"
cont "come with that"
cont "power alone."
para "I won't rely on"
line "my psychic"
cont "powers this"
cont "time."
para "My true strength."
line "My true self."
para "Allow me to test"
line "them against"
cont "you!"
done
_SabrinaRematchDefeatedText::
text "I doubt"
line "I'll encounter"
cont "a TRAINER like"
cont "you ever again."
prompt

View file

@ -1,21 +1,43 @@
_LTSurgePreBattleText:: _LTSurgePreBattleText:: ; Yellow text, which works better with his rematch text.
text "Hey, kid! What do" text "Ten-hut! Welcome"
line "you think you're" line "to VERMILION GYM!"
cont "doing here?"
para "You won't live" para "Will you look at"
line "long in combat!" line "that, a pint-size"
cont "That's for sure!" cont "challenger!"
para "I tell you kid," para "Hahaha! You've got"
line "electric #MON" line "big and brassy"
cont "saved me during" cont "nerves to take me"
cont "the war!" cont "on with your puny"
cont "power!"
para "They zapped my" para "A #MON battle"
line "enemies into" line "is war! I'll show"
cont "paralysis!" cont "you, civilian!"
para "The same as I'll" para "I'll shock you"
line "do to you!" line "into surrender!"
done
; I usually use LGPE text, but honestly, Surge's just sucks, so I doctored it a bit.
_SurgeRematchPreBattleText::
text "Hey there, kid!"
line "Pretty shocking"
cont "you made it"
cont "through the"
cont "#MON LEAGUE!"
para "I can't think"
line "of a stronger"
cont "TRAINER I've"
cont "battled since"
cont "first arriving"
cont "in KANTO..."
para "Let's have a"
line "rematch, eh?"
para "I'll zap you"
line "into paralysis!"
done done

View file

@ -143,3 +143,8 @@ _VermilionGymGuidePostBattleText::
text "Whew! That match" text "Whew! That match"
line "was electric!" line "was electric!"
done done
_SurgeRematchDefeatedText::
text "Absolutely"
line "shocking!"
prompt