kep-hack/scripts/SilphCo3F.asm
Martha Schilling 508a4e790e The Big One.
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.
2023-09-19 23:34:25 +01:00

161 lines
3 KiB
NASM

SilphCo3F_Script:
call SilphCo3Script_59f71
call EnableAutoTextBoxDrawing
ld hl, SilphCo3TrainerHeaders
ld de, SilphCo3F_ScriptPointers
ld a, [wSilphCo3FCurScript]
call ExecuteCurMapScriptInTable
ld [wSilphCo3FCurScript], a
ret
SilphCo3Script_59f71:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
ld hl, SilphCo3GateCoords
call SilphCo2Script_59d43
call SilphCo3Script_59fad
CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1
jr nz, .asm_59f98
push af
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 4, 4
predef ReplaceTileBlock
pop af
.asm_59f98
CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret nz
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 4, 8
predef_jump ReplaceTileBlock
SilphCo3GateCoords:
dbmapcoord 4, 4
dbmapcoord 8, 4
db -1 ; end
SilphCo2Script_59d43:
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_59d4f
ld a, [hli]
cp $ff
jr z, .asm_59d6b
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
jr z, .asm_59d60
inc hl
jr .asm_59d4f
.asm_59d60
ld a, [hli]
cp c
jr nz, .asm_59d4f
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
.asm_59d6b
xor a
ldh [hUnlockedSilphCoDoors], a
ret
SilphCo3Script_59fad:
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
jr nz, .next
SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret
.next
SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret
SilphCo3F_ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
SilphCo3F_TextPointers:
dw SilphCo3Text1
dw SilphCo3Text2
dw SilphCo3Text3
dw PickUpItemText
SilphCo3TrainerHeaders:
def_trainers 2
SilphCo3TrainerHeader0:
trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3BattleText1, SilphCo3EndBattleText1, SilphCo3AfterBattleText1
SilphCo3TrainerHeader1:
trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3BattleText2, SilphCo3EndBattleText2, SilphCo3AfterBattleText2
db -1 ; end
SilphCo3Text1:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
ld hl, SilphCo3Text_59ffe
jr nz, .asm_59fee
ld hl, SilphCo3Text_59ff9
.asm_59fee
call PrintText
jp TextScriptEnd
SilphCo3Text_59ff9:
text_far _SilphCo3Text_59ff9
text_end
SilphCo3Text_59ffe:
text_far _SilphCo3Text_59ffe
text_end
SilphCo3Text2:
text_asm
ld hl, SilphCo3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo3BattleText1:
text_far _SilphCo3BattleText1
text_end
SilphCo3EndBattleText1:
text_far _SilphCo3EndBattleText1
text_end
SilphCo3AfterBattleText1:
text_far _SilphCo3AfterBattleText1
text_end
SilphCo3Text3:
text_asm
ld hl, SilphCo3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo3BattleText2:
text_far _SilphCo3BattleText2
text_end
SilphCo3EndBattleText2:
text_far _SilphCo3EndBattleText2
text_end
SilphCo3AfterBattleText2:
text_far _SilphCo3AfterBattleText2
text_end