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.
242 lines
4.6 KiB
NASM
242 lines
4.6 KiB
NASM
SilphCo5F_Script:
|
|
call SilphCo5Script_19f4d
|
|
call EnableAutoTextBoxDrawing
|
|
ld hl, SilphCo5TrainerHeaders
|
|
ld de, SilphCo5F_ScriptPointers
|
|
ld a, [wSilphCo5FCurScript]
|
|
call ExecuteCurMapScriptInTable
|
|
ld [wSilphCo5FCurScript], a
|
|
ret
|
|
|
|
SilphCo5Script_19f4d:
|
|
ld hl, wCurrentMapScriptFlags
|
|
bit 5, [hl]
|
|
res 5, [hl]
|
|
ret z
|
|
ld hl, SilphCo5GateCoords
|
|
call SilphCo4Script_19d5d
|
|
call SilphCo5Script_19f9e
|
|
CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
jr nz, .asm_19f74
|
|
push af
|
|
ld a, $5f
|
|
ld [wNewTileBlockID], a
|
|
lb bc, 2, 3
|
|
predef ReplaceTileBlock
|
|
pop af
|
|
.asm_19f74
|
|
CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
jr nz, .asm_19f87
|
|
push af
|
|
ld a, $5f
|
|
ld [wNewTileBlockID], a
|
|
lb bc, 6, 3
|
|
predef ReplaceTileBlock
|
|
pop af
|
|
.asm_19f87
|
|
CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2
|
|
ret nz
|
|
ld a, $5f
|
|
ld [wNewTileBlockID], a
|
|
lb bc, 5, 7
|
|
predef_jump ReplaceTileBlock
|
|
|
|
SilphCo5GateCoords:
|
|
dbmapcoord 3, 2
|
|
dbmapcoord 3, 6
|
|
dbmapcoord 7, 5
|
|
db -1 ; end
|
|
|
|
SilphCo4Script_19d5d:
|
|
push hl
|
|
ld hl, wCardKeyDoorY
|
|
ld a, [hli]
|
|
ld b, a
|
|
ld a, [hl]
|
|
ld c, a
|
|
xor a
|
|
ldh [hUnlockedSilphCoDoors], a
|
|
pop hl
|
|
.asm_19d69
|
|
ld a, [hli]
|
|
cp $ff
|
|
jr z, .asm_19d85
|
|
push hl
|
|
ld hl, hUnlockedSilphCoDoors
|
|
inc [hl]
|
|
pop hl
|
|
cp b
|
|
jr z, .asm_19d7a
|
|
inc hl
|
|
jr .asm_19d69
|
|
.asm_19d7a
|
|
ld a, [hli]
|
|
cp c
|
|
jr nz, .asm_19d69
|
|
ld hl, wCardKeyDoorY
|
|
xor a
|
|
ld [hli], a
|
|
ld [hl], a
|
|
ret
|
|
.asm_19d85
|
|
xor a
|
|
ldh [hUnlockedSilphCoDoors], a
|
|
ret
|
|
|
|
SilphCo5Script_19f9e:
|
|
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
ldh a, [hUnlockedSilphCoDoors]
|
|
and a
|
|
ret z
|
|
cp $1
|
|
jr nz, .next1
|
|
SetEventReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
ret
|
|
.next1
|
|
cp $2
|
|
jr nz, .next2
|
|
SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
ret
|
|
.next2
|
|
SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
|
|
ret
|
|
|
|
SilphCo5F_ScriptPointers:
|
|
dw CheckFightingMapTrainers
|
|
dw DisplayEnemyTrainerTextAndStartBattle
|
|
dw EndTrainerBattle
|
|
|
|
SilphCo5F_TextPointers:
|
|
dw SilphCo5Text1
|
|
dw SilphCo5Text2
|
|
dw SilphCo5Text3
|
|
dw SilphCo5Text4
|
|
dw SilphCo5Text5
|
|
dw PickUpItemText
|
|
dw PickUpItemText
|
|
dw PickUpItemText
|
|
dw SilphCo5Text9
|
|
dw SilphCo5Text10
|
|
dw SilphCo5Text11
|
|
|
|
SilphCo5TrainerHeaders:
|
|
def_trainers 2
|
|
SilphCo5TrainerHeader0:
|
|
trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_0, 1, SilphCo5BattleText2, SilphCo5EndBattleText2, SilphCo5AfterBattleText2
|
|
SilphCo5TrainerHeader1:
|
|
trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_1, 2, SilphCo5BattleText3, SilphCo5EndBattleText3, SilphCo5AfterBattleText3
|
|
SilphCo5TrainerHeader2:
|
|
trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_2, 4, SilphCo5BattleText4, SilphCo5EndBattleText4, SilphCo5AfterBattleText4
|
|
SilphCo5TrainerHeader3:
|
|
trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_3, 3, SilphCo5BattleText5, SilphCo5EndBattleText5, SilphCo5AfterBattleText5
|
|
db -1 ; end
|
|
|
|
SilphCo6Script_1a22f:
|
|
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
|
|
jr nz, .asm_1a238
|
|
jr .asm_1a23a
|
|
.asm_1a238
|
|
ld h, d
|
|
ld l, e
|
|
.asm_1a23a
|
|
jp PrintText
|
|
|
|
SilphCo5Text1:
|
|
text_asm
|
|
ld hl, SilphCo5Text_1a010
|
|
ld de, SilphCo5Text_1a015
|
|
call SilphCo6Script_1a22f
|
|
jp TextScriptEnd
|
|
|
|
SilphCo5Text_1a010:
|
|
text_far _SilphCo5Text_1a010
|
|
text_end
|
|
|
|
SilphCo5Text_1a015:
|
|
text_far _SilphCo5Text_1a015
|
|
text_end
|
|
|
|
SilphCo5Text2:
|
|
text_asm
|
|
ld hl, SilphCo5TrainerHeader0
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
SilphCo5BattleText2:
|
|
text_far _SilphCo5BattleText2
|
|
text_end
|
|
|
|
SilphCo5EndBattleText2:
|
|
text_far _SilphCo5EndBattleText2
|
|
text_end
|
|
|
|
SilphCo5AfterBattleText2:
|
|
text_far _SilphCo5AfterBattleText2
|
|
text_end
|
|
|
|
SilphCo5Text3:
|
|
text_asm
|
|
ld hl, SilphCo5TrainerHeader1
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
SilphCo5BattleText3:
|
|
text_far _SilphCo5BattleText3
|
|
text_end
|
|
|
|
SilphCo5EndBattleText3:
|
|
text_far _SilphCo5EndBattleText3
|
|
text_end
|
|
|
|
SilphCo5AfterBattleText3:
|
|
text_far _SilphCo5AfterBattleText3
|
|
text_end
|
|
|
|
SilphCo5Text4:
|
|
text_asm
|
|
ld hl, SilphCo5TrainerHeader2
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
SilphCo5BattleText4:
|
|
text_far _SilphCo5BattleText4
|
|
text_end
|
|
|
|
SilphCo5EndBattleText4:
|
|
text_far _SilphCo5EndBattleText4
|
|
text_end
|
|
|
|
SilphCo5AfterBattleText4:
|
|
text_far _SilphCo5AfterBattleText4
|
|
text_end
|
|
|
|
SilphCo5Text5:
|
|
text_asm
|
|
ld hl, SilphCo5TrainerHeader3
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
SilphCo5BattleText5:
|
|
text_far _SilphCo5BattleText5
|
|
text_end
|
|
|
|
SilphCo5EndBattleText5:
|
|
text_far _SilphCo5EndBattleText5
|
|
text_end
|
|
|
|
SilphCo5AfterBattleText5:
|
|
text_far _SilphCo5AfterBattleText5
|
|
text_end
|
|
|
|
SilphCo5Text9:
|
|
text_far _SilphCo5Text9
|
|
text_end
|
|
|
|
SilphCo5Text10:
|
|
text_far _SilphCo5Text10
|
|
text_end
|
|
|
|
SilphCo5Text11:
|
|
text_far _SilphCo5Text11
|
|
text_end
|