mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00
Fix crash when losing to Yujirou
The reason was because not all the infrastructure for an actual battle was set up - this fixes it. It still has some strange text that appears though. Also did some minor optimisations on the Vermillion Dock stuff - I think the direction I am taking Faraway Island will work. However, something in that script causes any and all special warps to crash in some way. I am not sure what it is that does it.
This commit is contained in:
parent
9015062b0a
commit
3ef4cea23d
|
@ -16,7 +16,7 @@ ViridianPreGym_Object:
|
|||
def_object_events
|
||||
object_event 6, 9, SPRITE_GIRL, STAY, LEFT, 1, OPP_STUDENT, 1 ; person, Trainer 1
|
||||
object_event 3, 8, SPRITE_GIRL, STAY, RIGHT, 2, OPP_STUDENT, 2 ; person, Trainer 2
|
||||
object_event 5, 2, SPRITE_YOUNGSTER, STAY, NONE, 3 ; person, Yujirou
|
||||
object_event 5, 2, SPRITE_YOUNGSTER, STAY, NONE, 3, OPP_YUJIROU, 1 ; person, Yujirou
|
||||
object_event 1, 6, SPRITE_GYM_GUIDE, STAY, DOWN, 4 ; person
|
||||
|
||||
def_warps_to VIRIDIAN_PRE_GYM
|
|
@ -78,6 +78,7 @@ FlyWarpDataPtr:
|
|||
fly_warp_spec ROUTE_4, .Route4
|
||||
fly_warp_spec ROUTE_10, .Route10
|
||||
fly_warp_spec REDS_HOUSE_2F, .RedsHouse2F ; This doesn't show on the Fly map, just used so the post-league warp doesn't have a stroke
|
||||
fly_warp_spec FARAWAY_ISLAND_OUTSIDE, .FarawayIslandOutside
|
||||
|
||||
.PalletTown: fly_warp PALLET_TOWN, 5, 6
|
||||
.ViridianCity: fly_warp VIRIDIAN_CITY, 23, 26
|
||||
|
@ -95,3 +96,4 @@ FlyWarpDataPtr:
|
|||
.Route4: fly_warp ROUTE_4, 11, 6
|
||||
.Route10: fly_warp ROUTE_10, 11, 20
|
||||
.RedsHouse2F: fly_warp REDS_HOUSE_2F, 3, 6
|
||||
.FarawayIslandOutside: fly_warp FARAWAY_ISLAND_OUTSIDE, 2, 23
|
|
@ -24,11 +24,9 @@ IshiharaTeam:
|
|||
db EXEGGUTOR_A, 90
|
||||
db MELTAN, 90
|
||||
db TRAMPEL, 90
|
||||
IF DEF(_DEBUG)
|
||||
db MEWTWO, 90
|
||||
db RAICHU_A, 50
|
||||
db CROCKY, 90
|
||||
ENDC
|
||||
db CROCKY, 5
|
||||
db -1 ; end
|
||||
|
||||
DebugStart:
|
||||
|
|
|
@ -226,24 +226,22 @@ PassListings:
|
|||
ld a, [hl]
|
||||
ldh [hItemToRemoveID], a
|
||||
cp S_S_TICKET
|
||||
jr z, .choseSSAnne
|
||||
jp z, VermilionCityText3.playerHasTicket ; Saves time and less risk of bugs
|
||||
cp OLD_SEA_MAP
|
||||
jr z, .choseFaraway
|
||||
cp CITRINE_PASS
|
||||
jr z, .choseCitrine
|
||||
; god bless the safari game and pokemon tower 7f for being the few times a forcewarp exists
|
||||
; For some reason, these aren't working properly...
|
||||
.choseSSAnne
|
||||
jp VermilionCityText3.playerHasTicket ; Saves time and less risk of bugs
|
||||
.choseFaraway
|
||||
ld hl, EventVermillionCityOldSeaMap
|
||||
call PrintText
|
||||
ld a, FARAWAY_ISLAND_OUTSIDE
|
||||
ldh [hWarpDestinationMap], a
|
||||
ld a, $1
|
||||
ld [wDestinationWarpID], a
|
||||
call WarpFound2
|
||||
jr .done
|
||||
ld a, FARAWAY_ISLAND_OUTSIDE
|
||||
ld [wDestinationMap], a
|
||||
ld hl, wd732
|
||||
set 2, [hl] ; fly warp or dungeon warp
|
||||
call SpecialWarpIn
|
||||
jp SpecialEnterMap
|
||||
.choseCitrine
|
||||
ld hl, EventVermillionCityCitrinePass
|
||||
call PrintText
|
||||
|
|
|
@ -56,13 +56,10 @@ ViridianPreGymTrainerHeader1:
|
|||
|
||||
YujirouText:
|
||||
text_asm
|
||||
|
||||
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff
|
||||
jr nz, .rematchMode
|
||||
|
||||
CheckEvent EVENT_BEAT_YUJIROU
|
||||
jr nz, .YujirouBeaten
|
||||
|
||||
jp nz, .YujirouBeaten
|
||||
ld hl, YujirouIntro
|
||||
call PrintText
|
||||
|
||||
|
@ -73,7 +70,12 @@ YujirouText:
|
|||
ld hl, wd72d
|
||||
set 6, [hl]
|
||||
set 7, [hl]
|
||||
call Delay3
|
||||
ld hl, YujirouLoseText
|
||||
ld de, YujirouWinText
|
||||
call SaveEndBattleTextPointers
|
||||
ldh a, [hSpriteIndex]
|
||||
ld [wSpriteIndex], a
|
||||
call EngageMapTrainer
|
||||
|
||||
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
|
||||
ld a, OPP_YUJIROU
|
||||
|
@ -88,9 +90,6 @@ YujirouText:
|
|||
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
ld hl, YujirouLoseText
|
||||
ld de, YujirouWinText
|
||||
call SaveEndBattleTextPointers
|
||||
ld a, $3
|
||||
ld [wViridianPreGymCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
|
@ -121,7 +120,6 @@ YujirouText:
|
|||
.YujirouBeaten
|
||||
ld hl, YujirouAfterBattleText
|
||||
call PrintText
|
||||
jr .done
|
||||
.done
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
Loading…
Reference in a new issue