mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Groundwork
Letter is there, post-game warp is done, new post-game event where you receive the letter isn't working properly
This commit is contained in:
parent
0852d5f725
commit
c4afafb9ac
|
@ -8,7 +8,8 @@
|
|||
const EVENT_HALL_OF_FAME_DEX_RATING
|
||||
const EVENT_GOT_SQUIRTLE
|
||||
const EVENT_PALLET_AFTER_GETTING_POKEBALLS
|
||||
const_skip 17
|
||||
const EVENT_LETTER_RECEIVED
|
||||
const_skip 16
|
||||
const EVENT_GOT_TOWN_MAP
|
||||
const EVENT_ENTERED_BLUES_HOUSE
|
||||
const EVENT_DAISY_WALKING
|
||||
|
|
|
@ -103,6 +103,7 @@ DEF SAFARI_ROCK EQU $16 ; overload
|
|||
const METAL_COAT ; $5C
|
||||
const MYSTERY_BOX ; $5D
|
||||
const TEA ; $5E
|
||||
const SILPHLETTER ; $5F
|
||||
DEF NUM_ITEMS EQU const_value - 1
|
||||
|
||||
; elevator floors use item IDs
|
||||
|
|
|
@ -254,4 +254,4 @@ CredChatot:
|
|||
CredEni:
|
||||
db -3, "ENIGAMI@"
|
||||
CredVort:
|
||||
db -4, "VORTIENE@"
|
||||
db -3, "VORTIENE@"
|
||||
|
|
|
@ -94,6 +94,7 @@ KeyItemFlags:
|
|||
dbit FALSE ; METAL_COAT
|
||||
dbit TRUE ; MYSTERY_BOX
|
||||
dbit TRUE ; TEA
|
||||
dbit TRUE ; SILPHLETTER
|
||||
dbit TRUE ; FLOOR_B2F
|
||||
dbit TRUE ; FLOOR_B1F
|
||||
dbit TRUE ; FLOOR_1F
|
||||
|
|
|
@ -94,6 +94,7 @@ ItemNames::
|
|||
li "METAL COAT"
|
||||
li "MYSTERY BOX"
|
||||
li "TEA"
|
||||
li "SILPHLETTER"
|
||||
assert_list_length NUM_ITEMS
|
||||
li "B2F"
|
||||
li "B1F"
|
||||
|
|
|
@ -94,6 +94,7 @@ ItemPrices::
|
|||
bcd3 3000 ; METAL_COAT
|
||||
bcd3 0 ; MYSTERY_BOX
|
||||
bcd3 0 ; TEA
|
||||
bcd3 0 ; SILPHLETTER
|
||||
assert_table_length NUM_ITEMS
|
||||
bcd3 0 ; FLOOR_B2F
|
||||
bcd3 0 ; FLOOR_B1F
|
||||
|
|
|
@ -4,8 +4,8 @@ IndigoPlateauLobby_Object:
|
|||
def_warp_events
|
||||
warp_event 7, 11, LAST_MAP, 1
|
||||
warp_event 8, 11, LAST_MAP, 2
|
||||
;warp_event 8, 0, HALL_OF_FAME, 1 ; test post-game setup
|
||||
warp_event 8, 0, LORELEIS_ROOM, 1
|
||||
warp_event 8, 0, HALL_OF_FAME, 1 ; test post-game setup
|
||||
;warp_event 8, 0, LORELEIS_ROOM, 1
|
||||
|
||||
def_bg_events
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ MACRO special_warp_spec
|
|||
db \4
|
||||
ENDM
|
||||
|
||||
FirstMapSpec:
|
||||
FirstMapSpec::
|
||||
special_warp_spec REDS_HOUSE_2F, 3, 6, REDS_HOUSE_2
|
||||
TradeCenterSpec1:
|
||||
special_warp_spec TRADE_CENTER, 3, 4, CLUB
|
||||
|
@ -77,6 +77,7 @@ FlyWarpDataPtr:
|
|||
fly_warp_spec CELADON_UNIVERSITY_OUTSIDE, .CeladonUniversityOutside
|
||||
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
|
||||
|
||||
.PalletTown: fly_warp PALLET_TOWN, 5, 6
|
||||
.ViridianCity: fly_warp VIRIDIAN_CITY, 23, 26
|
||||
|
@ -93,3 +94,4 @@ FlyWarpDataPtr:
|
|||
.CeladonUniversityOutside: fly_warp CELADON_UNIVERSITY_OUTSIDE, 15, 26
|
||||
.Route4: fly_warp ROUTE_4, 11, 6
|
||||
.Route10: fly_warp ROUTE_10, 11, 20
|
||||
.RedsHouse2F: fly_warp REDS_HOUSE_2F, 3, 6
|
||||
|
|
|
@ -358,6 +358,11 @@ _TeaDescription::
|
|||
next "quenching thirst."
|
||||
prompt
|
||||
|
||||
_SilphLetterDescription::
|
||||
text "A LETTER from"
|
||||
next "the SILPH CHIEF."
|
||||
prompt
|
||||
|
||||
_HM01Description::
|
||||
text "Cuts using claws,"
|
||||
next "scythes, etc."
|
||||
|
|
|
@ -187,9 +187,9 @@ DebugPikachuEevee:
|
|||
jr .loop
|
||||
|
||||
DebugPikachuEeveeShows:
|
||||
db HS_DAMIEN ; Charmander guy
|
||||
db HS_VERMILION_JENNY ; Squirtle
|
||||
db -1 ; end
|
||||
db HS_DAMIEN ; Charmander guy
|
||||
db HS_VERMILION_JENNY ; Squirtle
|
||||
db -1 ; end
|
||||
|
||||
DebugSetPokedexEntries:
|
||||
ld b, wPokedexOwnedEnd - wPokedexOwned
|
||||
|
@ -203,6 +203,7 @@ DebugSetPokedexEntries:
|
|||
|
||||
DebugItemsList:
|
||||
db MASTER_BALL, 99
|
||||
db SILPHLETTER, 1
|
||||
db MYSTERY_BOX, 1
|
||||
db CANDY_JAR, 1
|
||||
db BICYCLE, 1
|
||||
|
|
|
@ -111,6 +111,7 @@ ItemUsePtrTable:
|
|||
dw ItemUseEvoStone ; METAL_COAT
|
||||
dw ItemUseMysteryBox ; MYSTERY_BOX
|
||||
dw UnusableItem ; TEA
|
||||
dw ItemUseLetter ; SILPHLETTER
|
||||
dw UnusableItem ; FLOOR_B2F
|
||||
dw UnusableItem ; FLOOR_B1F
|
||||
dw UnusableItem ; FLOOR_1F
|
||||
|
@ -126,6 +127,16 @@ ItemUsePtrTable:
|
|||
dw UnusableItem ; FLOOR_11F
|
||||
dw UnusableItem ; FLOOR_14F
|
||||
|
||||
ItemUseLetter:
|
||||
text_asm
|
||||
ld hl, ChiefLetterText
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
ChiefLetterText:
|
||||
text_far _ChiefLetterText
|
||||
text_end
|
||||
|
||||
ItemUseMysteryBox:
|
||||
; Mystery Box can't be used in battle.
|
||||
ld a, [wIsInBattle]
|
||||
|
|
|
@ -202,6 +202,8 @@ ItemDescriptionPointers:
|
|||
text_end
|
||||
text_far _TeaDescription
|
||||
text_end
|
||||
text_far _SilphLetterDescription
|
||||
text_end
|
||||
text_far _HM01Description
|
||||
text_end
|
||||
text_far _HM02Description
|
||||
|
|
|
@ -117,7 +117,7 @@ MainMenu:
|
|||
ld a, [wCurMap] ; map ID
|
||||
cp HALL_OF_FAME
|
||||
jp nz, SpecialEnterMap
|
||||
xor a
|
||||
ld a, REDS_HOUSE_2F
|
||||
ld [wDestinationMap], a
|
||||
ld hl, wd732
|
||||
set 2, [hl] ; fly warp or dungeon warp
|
||||
|
|
|
@ -1991,7 +1991,8 @@ wPalletTownCurScript:: db
|
|||
wCitrineRocketHouseCurScript:: db
|
||||
wBluesHouseCurScript:: db
|
||||
wViridianCityCurScript:: db
|
||||
ds 2
|
||||
wRedsHouse1FCurScript:: db
|
||||
ds 1
|
||||
wPewterCityCurScript:: db
|
||||
wRoute3CurScript:: db
|
||||
wRoute4CurScript:: db
|
||||
|
|
|
@ -43,7 +43,8 @@ HallofFameRoomScript2:
|
|||
ResetEventRange INDIGO_PLATEAU_EVENTS_START, INDIGO_PLATEAU_EVENTS_END, 1
|
||||
xor a
|
||||
ld [wHallOfFameCurScript], a
|
||||
ld a, PALLET_TOWN
|
||||
ld hl, FirstMapSpec
|
||||
ld a, [hli]
|
||||
ld [wLastBlackoutMap], a
|
||||
farcall SaveSAVtoSRAM
|
||||
ld b, 5
|
||||
|
|
|
@ -1,9 +1,81 @@
|
|||
RedsHouse1F_Script:
|
||||
jp EnableAutoTextBoxDrawing
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld hl, RedsHouse1F_ScriptPointers
|
||||
ld a, [wRedsHouse1FCurScript]
|
||||
jp CallFunctionInTable
|
||||
|
||||
RedsHouse1F_ScriptPointers:
|
||||
dw ChiefLetter1
|
||||
dw ChiefLetter2
|
||||
|
||||
ChiefLetter1:
|
||||
CheckEvent EVENT_POST_GAME_ATTAINED
|
||||
jr z, .done
|
||||
CheckEvent EVENT_LETTER_RECEIVED
|
||||
jr nz, .done
|
||||
; with the way this is being done, coords will be unnecessary.
|
||||
; this will trigger the minute you enter the house.
|
||||
call UpdateSprites
|
||||
call PlayerSeeMom
|
||||
|
||||
ld a, $ff
|
||||
ld [wJoyIgnore], a
|
||||
ld hl, wSimulatedJoypadStatesEnd
|
||||
ld de, PlayerSeeMom_RLEMovement
|
||||
call DecodeRLEList
|
||||
dec a
|
||||
ld [wSimulatedJoypadStatesIndex], a
|
||||
call StartSimulatingJoypadStates
|
||||
|
||||
ld a, $2
|
||||
ld [wRedsHouse1FCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
.done
|
||||
ret
|
||||
|
||||
ChiefLetter2:
|
||||
ld a, [wSimulatedJoypadStatesIndex]
|
||||
and a
|
||||
ret nz
|
||||
call Delay3
|
||||
|
||||
ld a, $1
|
||||
ldh [hSpriteIndex], a
|
||||
|
||||
ld a, SPRITE_FACING_LEFT
|
||||
ldh [hSpriteFacingDirection], a
|
||||
call SetSpriteFacingDirectionAndDelay
|
||||
|
||||
ld hl, MomGreeting
|
||||
call PrintText
|
||||
SetEvent EVENT_LETTER_RECEIVED
|
||||
|
||||
ld a, $1
|
||||
ld [wRedsHouse1FCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
ret
|
||||
|
||||
PlayerSeeMom:
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
|
||||
ld [wEmotionBubbleSpriteIndex], a
|
||||
xor a ; EXCLAMATION_BUBBLE
|
||||
ld [wWhichEmotionBubble], a
|
||||
predef EmotionBubble
|
||||
ld c, 20
|
||||
call DelayFrames
|
||||
ret
|
||||
|
||||
PlayerSeeMom_RLEMovement:
|
||||
db D_LEFT, 1
|
||||
db D_DOWN, 3
|
||||
db -1 ; end
|
||||
|
||||
RedsHouse1F_TextPointers:
|
||||
dw RedsHouse1FMomText
|
||||
dw RedsHouse1FTVText
|
||||
dw MomGreeting
|
||||
|
||||
RedsHouse1FMomText:
|
||||
text_asm
|
||||
|
@ -70,3 +142,39 @@ StandByMeText:
|
|||
TVWrongSideText:
|
||||
text_far _TVWrongSideText
|
||||
text_end
|
||||
|
||||
; Post-Game stuff here.
|
||||
|
||||
MomGreeting:
|
||||
text_asm
|
||||
ld hl, MomYoureBack
|
||||
call PrintText
|
||||
lb bc, SILPHLETTER, 1
|
||||
call GiveItem
|
||||
ld hl, ReceivedChiefLetterText
|
||||
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.
|
||||
ld hl, ChiefLetterText
|
||||
call PrintText
|
||||
ld hl, MomAmazing
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
ChiefLetterText:
|
||||
text_far _ChiefLetterText
|
||||
text_end
|
||||
|
||||
MomYoureBack:
|
||||
text_far _MomYoureBack
|
||||
text_end
|
||||
|
||||
ReceivedChiefLetterText:
|
||||
text_far _ReceivedChiefLetterText
|
||||
text_end
|
||||
|
||||
MomAmazing:
|
||||
text_far _MomAmazing
|
||||
text_end
|
||||
|
|
|
@ -35,3 +35,61 @@ _StandByMeText::
|
|||
_TVWrongSideText::
|
||||
text "Oops, wrong side."
|
||||
done
|
||||
|
||||
_MomYoureBack::
|
||||
text "MOM: <PLAYER>!"
|
||||
line "Good morning!"
|
||||
|
||||
para "I'm so proud of"
|
||||
line "you, dear! You've"
|
||||
cont "grown so much!"
|
||||
|
||||
para "Oh! I nearly"
|
||||
line "forgot..."
|
||||
|
||||
para "I received this"
|
||||
line "letter from"
|
||||
cont "SILPH CO."
|
||||
done
|
||||
|
||||
; I want the letter text to play when we use the letter, so it's gonna be like this.
|
||||
_ReceivedChiefLetterText::
|
||||
text "<PLAYER> received"
|
||||
line "@"
|
||||
text_ram wStringBuffer
|
||||
text "!@"
|
||||
text_end
|
||||
|
||||
_ChiefLetterText::
|
||||
text "Dear <PLAYER>!"
|
||||
line "You are cordially"
|
||||
cont "invited to my"
|
||||
cont "greatest event!"
|
||||
|
||||
para "I call it...the"
|
||||
line "SILPH GAUNTLET!"
|
||||
|
||||
para "I have called"
|
||||
line "the greatest"
|
||||
cont "TRAINERs in all"
|
||||
cont "of KANTO! Even"
|
||||
cont "stronger than"
|
||||
cont "the ELITE FOUR!"
|
||||
|
||||
para "You will come to"
|
||||
line "SILPH CO., yes?"
|
||||
|
||||
para "See you then!"
|
||||
line " - CHIEF"
|
||||
done
|
||||
|
||||
_MomAmazing::
|
||||
text "Oh! Isn't this"
|
||||
line "amazing, sweetie?"
|
||||
|
||||
para "I'm sure you'll"
|
||||
line "do great!"
|
||||
|
||||
para "I'm always here"
|
||||
line "if you need me!"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue