mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00

Whoa, this one's been in the making for a while now. This one has been my attempt to fix as much as I could within a little over a month. Here's what I've got for you. - Fixed a bug in Silph Gauntlet where the trainers would not see you unless you spoke to them - Removed the unnecessary Gawarhed and Wugtrio static encounters. In what was once Gawarhed's place is a Rare Candy. - Implemented a working ferry system (huge thanks to Red++) that allows travelling to Faraway Island and Citrine City with the right tickets. Currently both maps use a copy of the SS Anne, which may be revised later. - Bittybat, Magnetite and Burgela have been removed to fix a Pokedex bug where entries wouldn't display correctly if the total number wasn't a multiple of 8. - Fixed a bug where fishing up a Wiglett and Wugtrio would play the trainer battle and Champion battle themes respectively - Restructured the Pokedex a little. Don't worry, Lickitung's still number 108! - All references to betamon in the disassembly have had their names updated to match the new Ogasawara ones - Removed Blastyke as a Game Corner prize, replacing it with Squeamata. - Garnet Cavern is now properly listed as a dungeon map - Fixed an issue where trying to leave Bill's House after entering the garden would put you back in the garden - Moved Silph Gauntlet's Beauty down 1 floor to make the number of trainers on each floor more consistent - Finished Gauntlet 6F except for the trainer text (PvK please help) - Gavillain's stats updated to match KEP 1.4 on the Showdown server. It's now a Dragon/Electric type with less Ice coverage. - Fixed Clefable's and Wigglytuff's starting movesets from an earlier commit - Fixed an ABSOLUTELY HORRIBLE, EGREGIOUSLY FRUSTRATING BUG that caused the Pokedex's seen counter to rarely update. This is what caused this commit to be delayed for so long. No joke. - New sprites, courtesy of Albatross, for Sylveon's back sprite, Alolan Marowak, Alolan Muk, Galarian Weezing and Magnezone! - Fixed a bug preventing the trade for Haunter from being accessed.
241 lines
4.8 KiB
NASM
241 lines
4.8 KiB
NASM
; Much of this is a recoded version of the Champion's room, which serves the same purpose.
|
|
|
|
SilphGauntlet7F_Script:
|
|
call EnableAutoTextBoxDrawing
|
|
ld hl, SilphGauntlet7F_ScriptPointers
|
|
ld a, [wSilphGauntlet7FCurScript]
|
|
jp CallFunctionInTable
|
|
|
|
ResetChiefScript:
|
|
xor a
|
|
ld [wJoyIgnore], a
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
ret
|
|
|
|
SilphGauntlet7F_ScriptPointers:
|
|
dw ChiefScript1
|
|
dw ChiefScript2
|
|
dw ChiefScript3
|
|
dw ChiefScript4
|
|
|
|
ChiefScript1:
|
|
CheckEvent EVENT_BEAT_CHIEF
|
|
jr nz, .skip
|
|
ld a, PLAYER_DIR_UP
|
|
ld [wPlayerMovingDirection], a
|
|
call UpdateSprites
|
|
jr MovePlayerToChief
|
|
.skip
|
|
ret
|
|
|
|
MovePlayerToChief:
|
|
ld a, $ff
|
|
ld [wJoyIgnore], a
|
|
ld hl, wSimulatedJoypadStatesEnd
|
|
ld de, ChiefEntrance_RLEMovement
|
|
call DecodeRLEList
|
|
dec a
|
|
ld [wSimulatedJoypadStatesIndex], a
|
|
call StartSimulatingJoypadStates
|
|
ld a, $1
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
ld [wCurMapScript], a
|
|
ret
|
|
|
|
ChiefEntrance_RLEMovement:
|
|
db D_UP, 4
|
|
db -1 ; end
|
|
|
|
ChiefScript2:
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
|
and a
|
|
ret nz
|
|
call Delay3
|
|
xor a
|
|
|
|
ld [wJoyIgnore], a
|
|
ld hl, wOptions
|
|
res 7, [hl] ; Turn on battle animations like with Blue
|
|
|
|
ld a, $1
|
|
ldh [hSpriteIndexOrTextID], a
|
|
call DisplayTextID
|
|
ld a, $2
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
ret
|
|
|
|
ChiefScript3:
|
|
ld a, [wIsInBattle]
|
|
cp $ff
|
|
jp z, ResetChiefScript
|
|
xor a
|
|
ld [wIsTrainerBattle], a
|
|
call UpdateSprites
|
|
SetEvent EVENT_BEAT_CHIEF
|
|
ld a, $f0
|
|
ld [wJoyIgnore], a
|
|
ld a, $1
|
|
ldh [hSpriteIndexOrTextID], a
|
|
call ChiefScript_That_Seems_Needed
|
|
ld a, $1
|
|
ldh [hSpriteIndex], a
|
|
call SetSpriteMovementBytesToFF
|
|
ld a, $3
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
jp TextScriptEnd
|
|
|
|
ChiefScript4:
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
|
and a
|
|
ret nz
|
|
xor a
|
|
ld [wJoyIgnore], a
|
|
|
|
; Grant Mewtwo access
|
|
ld a, HS_CERULEAN_CAVE_GUY
|
|
ld [wMissableObjectIndex], a
|
|
predef HideObject
|
|
; ResetEventRange SILPH_GAUNTLET_EVENTS_START, SILPH_GAUNTLET_EVENTS_END, 1 ; I want this to reset the trainers so you can refight them, but I'm very unsure how this works...
|
|
|
|
ld a, $0
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
ret
|
|
|
|
ChiefScript_That_Seems_Needed:
|
|
ld a, $f0
|
|
ld [wJoyIgnore], a
|
|
call DisplayTextID
|
|
ld a, $ff
|
|
ld [wJoyIgnore], a
|
|
ret
|
|
|
|
SilphGauntlet7F_TextPointers:
|
|
dw ChiefText1
|
|
dw ChiefPC
|
|
dw ChiefPainting1
|
|
dw ChiefPainting2
|
|
|
|
ChiefText1:
|
|
text_asm
|
|
CheckEvent EVENT_BEAT_CHIEF ; Check if Chief was beaten
|
|
jr nz, .chiefBeaten ; If Chief has been beaten, skip the trainer loading
|
|
; standard processing
|
|
ld hl, ChiefMonologue
|
|
call PrintText
|
|
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip.
|
|
and a ; yep, here too.
|
|
call z, WaitForTextScrollButtonPress ; and here.
|
|
call EnableAutoTextBoxDrawing ; and here.
|
|
|
|
CheckEvent EVENT_USED_MASTER_BALL ; Check if the Master Ball has been used.
|
|
ld hl, ChiefMonologueMasterBallNotUsed ; Load not used by default.
|
|
jr z, .masterBallSkip ; In which case, we can skip.
|
|
ld hl, ChiefMonologueMasterBallUsed ; If you get here, it's been used.
|
|
.masterBallSkip ; Now if it's been used, fall through to here.
|
|
call PrintText ; Now print the text.
|
|
|
|
ld c, BANK(Music_MeetEvilTrainer)
|
|
ld a, MUSIC_MEET_EVIL_TRAINER
|
|
call PlayMusic
|
|
|
|
call Delay3
|
|
ld hl, wd72d
|
|
set 6, [hl]
|
|
set 7, [hl]
|
|
ld a, OPP_CHIEF
|
|
ld [wCurOpponent], a
|
|
ld a, 1
|
|
ld [wTrainerNo], a
|
|
ld [wIsTrainerBattle], a
|
|
ld a, $1
|
|
ld [wSilphGauntlet7FCurScript], a
|
|
ld hl, ChiefDefeatedText
|
|
ld de, ChiefVictoryText
|
|
call SaveEndBattleTextPointers
|
|
jr .done
|
|
.chiefBeaten
|
|
ld hl, ChiefAfterBattleText
|
|
call PrintText
|
|
; fallthrough
|
|
.done
|
|
jp TextScriptEnd
|
|
|
|
ChiefMonologue:
|
|
text_far _ChiefMonologue
|
|
text_end
|
|
|
|
ChiefMonologueMasterBallUsed:
|
|
text_far _ChiefMonologueMasterBallUsed
|
|
text_end
|
|
|
|
ChiefMonologueMasterBallNotUsed:
|
|
text_far _ChiefMonologueMasterBallNotUsed
|
|
text_end
|
|
|
|
ChiefDefeatedText:
|
|
text_far _ChiefDefeatedText
|
|
text_end
|
|
|
|
ChiefVictoryText:
|
|
text_far _ChiefVictoryText
|
|
text_end
|
|
|
|
ChiefAfterBattleText:
|
|
text_far _ChiefAfterBattleText
|
|
text_end
|
|
|
|
ChiefPC:
|
|
text_far _ChiefPCText
|
|
text_end
|
|
|
|
ChiefPainting1:
|
|
text_far _ChiefPainting1
|
|
text_end
|
|
|
|
ChiefPainting2:
|
|
text_far _ChiefPainting2
|
|
text_end
|
|
|
|
; Originally, Chief was going to give you the Candy Jar.
|
|
; But this would relegate Melmetal to the post-game, which feels wrong.
|
|
; Instead, he gives you access to Mewtwo.
|
|
;ChiefText2:
|
|
; text_asm
|
|
; CheckEvent EVENT_GOT_CANDY_JAR
|
|
; jr nz, .got_item
|
|
; ld hl, CandyJarPreReceiveText
|
|
; call PrintText
|
|
; lb bc, CANDY_JAR, 1
|
|
; call GiveItem
|
|
; jr nc, .bag_full
|
|
; ld hl, ReceivedCandyJarText
|
|
; call PrintText
|
|
; SetEvent EVENT_GOT_CANDY_JAR
|
|
; jr .done
|
|
;.bag_full
|
|
; ld hl, CandyJarNoRoomText
|
|
; call PrintText
|
|
; jr .done
|
|
;.got_item
|
|
; ld hl, CandyJarExplanationText
|
|
; call PrintText
|
|
;.done
|
|
; jp TextScriptEnd
|
|
|
|
;CandyJarPreReceiveText:
|
|
; text_far _CandyJarPreReceiveText
|
|
; text_end
|
|
|
|
;ReceivedCandyJarText:
|
|
; text_far _ReceivedCandyJarText
|
|
; sound_get_item_1
|
|
; text_end
|
|
|
|
;CandyJarExplanationText:
|
|
; text_far _CandyJarExplanationText
|
|
; text_end
|
|
|
|
;CandyJarNoRoomText:
|
|
; text_far _CandyJarNoRoomText
|
|
; text_end
|