mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40: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.
111 lines
1.9 KiB
NASM
111 lines
1.9 KiB
NASM
CinnabarLabFossilRoom_Script:
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
CinnabarLabFossilRoom_TextPointers:
|
|
dw Lab4Text1
|
|
dw Lab4Text2
|
|
|
|
Lab4Script_GetFossilsInBag:
|
|
; construct a list of all fossils in the player's bag
|
|
xor a
|
|
ld [wFilteredBagItemsCount], a
|
|
ld de, wFilteredBagItems
|
|
ld hl, FossilsList
|
|
.loop
|
|
ld a, [hli]
|
|
and a
|
|
jr z, .done
|
|
push hl
|
|
push de
|
|
ld [wd11e], a
|
|
ld b, a
|
|
predef GetQuantityOfItemInBag
|
|
pop de
|
|
pop hl
|
|
ld a, b
|
|
and a
|
|
jr z, .loop
|
|
|
|
; A fossil's in the bag
|
|
ld a, [wd11e]
|
|
ld [de], a
|
|
inc de
|
|
push hl
|
|
ld hl, wFilteredBagItemsCount
|
|
inc [hl]
|
|
pop hl
|
|
jr .loop
|
|
.done
|
|
ld a, $ff
|
|
ld [de], a
|
|
ret
|
|
|
|
FossilsList:
|
|
db DOME_FOSSIL
|
|
db HELIX_FOSSIL
|
|
db OLD_AMBER
|
|
db WING_FOSSIL
|
|
db 0 ; end
|
|
|
|
Lab4Text1:
|
|
text_asm
|
|
CheckEvent EVENT_GAVE_FOSSIL_TO_LAB
|
|
jr nz, .asm_75d96
|
|
ld hl, Lab4Text_75dc6
|
|
call PrintText
|
|
call Lab4Script_GetFossilsInBag
|
|
ld a, [wFilteredBagItemsCount]
|
|
and a
|
|
jr z, .asm_75d8d
|
|
farcall GiveFossilToCinnabarLab
|
|
jr .asm_75d93
|
|
.asm_75d8d
|
|
ld hl, Lab4Text_75dcb
|
|
call PrintText
|
|
.asm_75d93
|
|
jp TextScriptEnd
|
|
.asm_75d96
|
|
CheckEventAfterBranchReuseA EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_GAVE_FOSSIL_TO_LAB
|
|
jr z, .asm_75da2
|
|
ld hl, Lab4Text_75dd0
|
|
call PrintText
|
|
jr .asm_75d93
|
|
.asm_75da2
|
|
call LoadFossilItemAndMonNameBank1D
|
|
ld hl, Lab4Text_75dd5
|
|
call PrintText
|
|
SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON
|
|
ld a, [wFossilMon]
|
|
ld b, a
|
|
ld c, 44
|
|
call GivePokemon
|
|
jr nc, .asm_75d93
|
|
ResetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_LAB_HANDING_OVER_FOSSIL_MON
|
|
jr .asm_75d93
|
|
|
|
Lab4Text_75dc6:
|
|
text_far _Lab4Text_75dc6
|
|
text_end
|
|
|
|
Lab4Text_75dcb:
|
|
text_far _Lab4Text_75dcb
|
|
text_end
|
|
|
|
Lab4Text_75dd0:
|
|
text_far _Lab4Text_75dd0
|
|
text_end
|
|
|
|
Lab4Text_75dd5:
|
|
text_far _Lab4Text_75dd5
|
|
text_end
|
|
|
|
Lab4Text2:
|
|
text_asm
|
|
ld a, TRADE_FOR_MICHELLE
|
|
ld [wWhichTrade], a
|
|
predef DoInGameTradeDialogue
|
|
jp TextScriptEnd
|
|
|
|
LoadFossilItemAndMonNameBank1D:
|
|
farjp LoadFossilItemAndMonName
|