From c4afafb9acb051d58863f4b97d245c25a8f51c1f Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:44:25 +0100 Subject: [PATCH 1/2] Groundwork Letter is there, post-game warp is done, new post-game event where you receive the letter isn't working properly --- constants/event_constants.asm | 3 +- constants/item_constants.asm | 1 + data/credits/credits_text.asm | 2 +- data/items/key_items.asm | 1 + data/items/names.asm | 1 + data/items/prices.asm | 1 + data/maps/objects/IndigoPlateauLobby.asm | 4 +- data/maps/special_warps.asm | 4 +- data/text/item_descriptions.asm | 5 ++ engine/debug/debug_party.asm | 7 +- engine/items/item_effects.asm | 11 +++ engine/menus/item_descriptions.asm | 2 + engine/menus/main_menu.asm | 2 +- ram/wram.asm | 3 +- scripts/HallOfFame.asm | 3 +- scripts/RedsHouse1F.asm | 110 ++++++++++++++++++++++- text/RedsHouse1F.asm | 58 ++++++++++++ 17 files changed, 206 insertions(+), 12 deletions(-) diff --git a/constants/event_constants.asm b/constants/event_constants.asm index d4114030..cd87ba18 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -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 diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 38d5a54e..32accfff 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -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 diff --git a/data/credits/credits_text.asm b/data/credits/credits_text.asm index 356b8206..1f0e4dd3 100644 --- a/data/credits/credits_text.asm +++ b/data/credits/credits_text.asm @@ -254,4 +254,4 @@ CredChatot: CredEni: db -3, "ENIGAMI@" CredVort: - db -4, "VORTIENE@" + db -3, "VORTIENE@" diff --git a/data/items/key_items.asm b/data/items/key_items.asm index f879bf6a..af2ec098 100644 --- a/data/items/key_items.asm +++ b/data/items/key_items.asm @@ -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 diff --git a/data/items/names.asm b/data/items/names.asm index 598cf42a..a57f0481 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -94,6 +94,7 @@ ItemNames:: li "METAL COAT" li "MYSTERY BOX" li "TEA" + li "SILPHLETTER" assert_list_length NUM_ITEMS li "B2F" li "B1F" diff --git a/data/items/prices.asm b/data/items/prices.asm index d578b316..6ec46daa 100644 --- a/data/items/prices.asm +++ b/data/items/prices.asm @@ -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 diff --git a/data/maps/objects/IndigoPlateauLobby.asm b/data/maps/objects/IndigoPlateauLobby.asm index eae9fc66..f8babc40 100644 --- a/data/maps/objects/IndigoPlateauLobby.asm +++ b/data/maps/objects/IndigoPlateauLobby.asm @@ -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 diff --git a/data/maps/special_warps.asm b/data/maps/special_warps.asm index f22a089f..38dc92d5 100644 --- a/data/maps/special_warps.asm +++ b/data/maps/special_warps.asm @@ -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 diff --git a/data/text/item_descriptions.asm b/data/text/item_descriptions.asm index cd7e05b8..313f7afe 100644 --- a/data/text/item_descriptions.asm +++ b/data/text/item_descriptions.asm @@ -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." diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm index 4c0e61b1..0dd9d63f 100644 --- a/engine/debug/debug_party.asm +++ b/engine/debug/debug_party.asm @@ -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 diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 6f458bfd..f54e35c9 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -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] diff --git a/engine/menus/item_descriptions.asm b/engine/menus/item_descriptions.asm index 4ff93221..070abab0 100644 --- a/engine/menus/item_descriptions.asm +++ b/engine/menus/item_descriptions.asm @@ -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 diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 8aad5075..f0962bd4 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -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 diff --git a/ram/wram.asm b/ram/wram.asm index 21fc0a00..0d0ae581 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -1991,7 +1991,8 @@ wPalletTownCurScript:: db wCitrineRocketHouseCurScript:: db wBluesHouseCurScript:: db wViridianCityCurScript:: db - ds 2 +wRedsHouse1FCurScript:: db + ds 1 wPewterCityCurScript:: db wRoute3CurScript:: db wRoute4CurScript:: db diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index 7c9f2f0b..8069e406 100644 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -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 diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm index f96209a9..f884308e 100644 --- a/scripts/RedsHouse1F.asm +++ b/scripts/RedsHouse1F.asm @@ -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 diff --git a/text/RedsHouse1F.asm b/text/RedsHouse1F.asm index a0c1852e..0fc9d62f 100644 --- a/text/RedsHouse1F.asm +++ b/text/RedsHouse1F.asm @@ -35,3 +35,61 @@ _StandByMeText:: _TVWrongSideText:: text "Oops, wrong side." done + +_MomYoureBack:: + text "MOM: !" + 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 " received" + line "@" + text_ram wStringBuffer + text "!@" + text_end + +_ChiefLetterText:: + text "Dear !" + 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 From a13b1a0a476bc8077847d5a15ed28929809d1526 Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Thu, 13 Jul 2023 02:11:45 +0100 Subject: [PATCH 2/2] Finish Post-Game Letter & Citrine Pass This makes it so that once you clear the game, you will be able to get the Silph Letter from your mom, and the Citrine Pass by beating Professor Oak. You'll now walk to your mother upon leaving your room post-clearing the game, and she'll hand you the letter. This'll basically explain your next quest to you. The Professor Oak event kind of destroyed my sanity but that's fine. It works. Thanks to Martha for the idea. Considerations for a full bag are done and they were annoying. I decided to show off and do some comedy to alleviate the lost sanity. --- constants/event_constants.asm | 11 ++- data/items/names.asm | 2 +- scripts/RedsHouse1F.asm | 134 ++++++++++++++++++++++----------- scripts/Route1.asm | 136 ++++++++++++++++++++++++++++++---- text/RedsHouse1F.asm | 67 +++++++++++++---- text/Route1.asm | 112 ++++++++++++++++++++++++---- 6 files changed, 367 insertions(+), 95 deletions(-) diff --git a/constants/event_constants.asm b/constants/event_constants.asm index cd87ba18..9d0d9359 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -3,13 +3,16 @@ ; Pallet Town events const_def const EVENT_FOLLOWED_OAK_INTO_LAB - const EVENT_GOT_BULBASAUR - const EVENT_54F ; Charmander + const EVENT_GOT_BULBASAUR ; Day Care Melanie + const EVENT_54F ; Route 24, Damien's Charmander const EVENT_HALL_OF_FAME_DEX_RATING - const EVENT_GOT_SQUIRTLE + const EVENT_GOT_SQUIRTLE ; Vermilion Officer Jenny const EVENT_PALLET_AFTER_GETTING_POKEBALLS const EVENT_LETTER_RECEIVED - const_skip 16 + const EVENT_FUCK ; If you trigger this you're a psychopath. Used for mom and oak post-game scenes. + const EVENT_RECEIVED_CITRINE_PASS + const EVENT_BEAT_OAK_ONCE + const_skip 13 const EVENT_GOT_TOWN_MAP const EVENT_ENTERED_BLUES_HOUSE const EVENT_DAISY_WALKING diff --git a/data/items/names.asm b/data/items/names.asm index a57f0481..aca0ef1d 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -94,7 +94,7 @@ ItemNames:: li "METAL COAT" li "MYSTERY BOX" li "TEA" - li "SILPHLETTER" + li "SILPH LETTER" assert_list_length NUM_ITEMS li "B2F" li "B1F" diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm index f884308e..2e8257d5 100644 --- a/scripts/RedsHouse1F.asm +++ b/scripts/RedsHouse1F.asm @@ -15,44 +15,47 @@ ChiefLetter1: 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 a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + call UpdateSprites ; idk most movement scripts use this fsr + call PlayerSeeMom ; Show a cute little emotion bubble from the player. + jr MovePlayer ; Now kick the player upstairs. If you do this any other way, the game freaks out (eg. constant emotion bubbles, rsts) +.done + ret + +MovePlayer: + ld a, $ff ; Firstly... + ld [wJoyIgnore], a ; No joypad inputs. No funny business. RLE is weird as fuck without it. 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 + call StartSimulatingJoypadStates ; By this point, we're auto-moving. + ld a, $1 ; Now... + ld [wRedsHouse1FCurScript], a ; Get kicked up another flight to ChiefLetter2. + ld [wCurMapScript], a ; Safety. ret ChiefLetter2: - ld a, [wSimulatedJoypadStatesIndex] + ld a, [wSimulatedJoypadStatesIndex] ; This ties up the loose ends with the RLE. and a ret nz - call Delay3 - - ld a, $1 - ldh [hSpriteIndex], a + call Delay3 ; Next... - ld a, SPRITE_FACING_LEFT - ldh [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay + xor a ; Now... + ld [wJoyIgnore], a ; The player needs to be able to mash A. + ld a, $1 ; Load Mom's NPC ID + ldh [hSpriteIndex], a ; Slap it in the index + ld a, SPRITE_FACING_RIGHT ; Get this ready + ldh [hSpriteFacingDirection], a ; Now she'll face right, simulatiung talking to her. + call SetSpriteFacingDirectionAndDelay ; Get this all out. + call DisplayTextID ; Display her text ID, using the same thing from before. + ; We did a little tomfoolery with her base text to make this work. Look below if you dare. - ld hl, MomGreeting - call PrintText - SetEvent EVENT_LETTER_RECEIVED - - ld a, $1 + ld a, $0 ; Anyway, kick the player back downstairs so the script can ret z for the rest of time. ld [wRedsHouse1FCurScript], a - ld [wCurMapScript], a + ld [wCurMapScript], a ; aaand safety. ret PlayerSeeMom: @@ -75,10 +78,16 @@ PlayerSeeMom_RLEMovement: RedsHouse1F_TextPointers: dw RedsHouse1FMomText dw RedsHouse1FTVText - dw MomGreeting RedsHouse1FMomText: text_asm + CheckEvent EVENT_POST_GAME_ATTAINED ; If the player hasn't got to the post game, we should never deal with this terribleness. + jr z, .normalProcessing ; So go to normal processing. Also if you go to debug without the post-game and letter events set up then this will loop infinitely. Please be reasonable. + CheckEvent EVENT_FUCK ; If some bozo triggers this I am going to be shocked. + jr nz, .bagWasFullButIsntNow ; No, seriously, you have to beat the Elite Four with a full bag. Ain't that a challenge? + CheckEvent EVENT_LETTER_RECEIVED ; Anyway, this was hell to debug. Let's go through the post-game together. + jr z, .letterSequence; This was all done so DisplayTextID could be used to get around a ton of bullshit. +.normalProcessing ld a, [wd72e] bit 3, a ; received a Pokémon from Oak? jr nz, .heal @@ -87,6 +96,48 @@ RedsHouse1FMomText: jr .done .heal call MomHealPokemon + jr .done +.letterSequence ; Look I know this code is cursed as fuck just bear with me + SetEvent EVENT_LETTER_RECEIVED ; Firstly, set the letter event + ld hl, MomYoureBack + call PrintText + lb bc, SILPHLETTER, 1 ; Alright, let's try to give the letter over. + call GiveItem ; Attempt is made. + jr nc, .bag_full ; If this triggers, you are a demented psychopath who needs to touch grass. + jr .LetterCanBeReceived ; If you're not weird, you can get it. Doing it this way saves a few instructions above. +.bag_full ; Psycho zone. + ld hl, MomBagFull + call PrintText + SetEvent EVENT_FUCK ; Set the funny event that I really wish I didn't need to have set up. + jr .done +.stillHavent ; Giga psycho zone. You get here if you still haven't sorted out your bag. + ld hl, MomBagStillFull + call PrintText + jr .done +.bagWasFullButIsntNow ; So now, if the weird kid has finally done their bag, we can progress. + ld hl, MomSavedIt + call PrintText + lb bc, SILPHLETTER, 1 ; We do this twice as otherwise it's a jr nightmare I don't want to debug + call GiveItem + jr nc, .stillHavent ; If they think they're smart, tough, it's a loop. + ; Otherwise, fallthrough +.LetterCanBeReceived ; Jump here when getting the letter is possible. + ld hl, ReceivedChiefLetterText ; So now they get their letter. + 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 a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip. again. i tried making it a func but it got funky. + and a ; yep, here too. + call z, WaitForTextScrollButtonPress ; and here. + call EnableAutoTextBoxDrawing ; and here. + ld hl, MomAmazing + call PrintText + ResetEvent EVENT_FUCK ; Anyway, unset this and never deal with it again. This resets mom to her normal state. + ; fallthrough .done jp TextScriptEnd @@ -145,24 +196,6 @@ TVWrongSideText: ; 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 @@ -173,8 +206,21 @@ MomYoureBack: ReceivedChiefLetterText: text_far _ReceivedChiefLetterText + sound_get_item_1 text_end MomAmazing: text_far _MomAmazing text_end + +MomBagFull: + text_far _MomBagFull + text_end + +MomSavedIt: + text_far _MomSavedIt + text_end + +MomBagStillFull: + text_far _MomBagStillFull + text_end diff --git a/scripts/Route1.asm b/scripts/Route1.asm index c5391bd4..ee38853d 100644 --- a/scripts/Route1.asm +++ b/scripts/Route1.asm @@ -1,9 +1,37 @@ Route1_Script: - jp EnableAutoTextBoxDrawing - ;ld hl, Route1_ScriptPointers + call EnableAutoTextBoxDrawing + ld hl, Route1_ScriptPointers ld a, [wRoute1CurScript] jp CallFunctionInTable +Route1_ScriptPointers: + dw Route1Script0 + dw OakVibeCheck + +Route1Script0: + ret ; yeah it's just a switch-off. shush. + +OakVibeCheck: + SetEvent EVENT_BEAT_OAK_ONCE ; This is set every time, but it doesn't matter, it sticks at 1 anyway. + CheckEvent EVENT_RECEIVED_CITRINE_PASS ; Before we do, has the player got the pass? + jr nz, .skip ; Yes? Now we go to auto-ret. + jr OakFirstWin ; Otherwise, move to the first win script to set that up. +.skip + ld a, $0 + ld [wRoute1CurScript], a + ret + +OakFirstWin: + CheckEvent EVENT_RECEIVED_CITRINE_PASS + jr nz, .skip + ld a, $3 + ldh [hSpriteIndex], a + call DisplayTextID +.skip + ld a, $0 + ld [wRoute1CurScript], a + ret + Route1_TextPointers: dw Route1Text1 dw Route1Text2 @@ -60,10 +88,19 @@ Route1Text3: ; text Route1OakText: text_asm - ld hl, OakBeforeBattleText + CheckEvent EVENT_BEAT_OAK_ONCE ; But if they've not beaten Oak, we need something else. + jr z, .skip ; So if they have, skip the next command. + CheckEvent EVENT_RECEIVED_CITRINE_PASS ; This is used for DisplayTextID. Is checked when Oak has been beaten once. + jp z, OakReceivePass +.skip + CheckEvent EVENT_BEAT_OAK_ONCE ; I am like, 99.9% sure there's another way to do this. + ld hl, OakFirstBattleText ; Load this only if the Citrine Pass hasn't been obtained yet. + jr z, .skip2 + ld hl, OakBeforeBattleText ; If he's been beaten before, load the usual prebattle text +.skip2 call PrintText - call YesNoChoice + call YesNoChoice ; Do they want in? ld a, [wCurrentMenuItem] and a jr nz, .refused @@ -86,40 +123,80 @@ Route1OakText: cp STARTER2 jr nz, .NotSquirtle ld a, $2 ; If Charmander, Venusaur - jr .done + jr .battleSetup .NotSquirtle cp STARTER3 jr nz, .Charmander ld a, $3 ; If Bulbasaur, Totartle - jr .done + jr .battleSetup .Charmander cp STARTER1 jr nz, .Pikachu ld a, $1 ; If Squirtle, Charizard - jr .done + jr .battleSetup .Pikachu cp STARTER4 jr nz, .Eevee ld a, $4 ; If Pikachu, all 3 - jr .done + jr .battleSetup .Eevee ld a, $5 ; If Eevee, also all 3 - jr .done + jr .battleSetup .refused ld hl, OakNo call PrintText - jp TextScriptEnd -.done + jr .done +.battleSetup ld [wTrainerNo], a ld a, 1 ld [wIsTrainerBattle], a - - ld a, $2 - ld [wRoute1CurScript], a ld hl, OakDefeatedText ld de, OakWonText call SaveEndBattleTextPointers + + ld a, $1 + ld [wRoute1CurScript], a +.done + jp TextScriptEnd + +OakReceivePass: + CheckEvent EVENT_FUCK ; This is for if the player is stupid + jp nz, .tryAgain + ld hl, OakFirstWinText + call PrintText + lb bc, CITRINE_PASS, 1 + call GiveItem + jr nc, .bagFull + jr .getPass +.tryAgain + ld hl, OakTryAgain + call PrintText + lb bc, CITRINE_PASS, 1 + call GiveItem + jr nc, .bagStillFull + jr .getPass +.bagFull + ld hl, OakBagFull + call PrintText + SetEvent EVENT_FUCK + jr .done +.bagStillFull + ld hl, OakBagStillFull + call PrintText + jr .done +.getPass + ld hl, ReceivedCitrinePassText + 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, OakCitrineExplain + call PrintText + SetEvent EVENT_RECEIVED_CITRINE_PASS + ; fallthrough +.done jp TextScriptEnd OakBeforeBattleText: @@ -140,4 +217,33 @@ OakYes: OakNo: text_far _OakNo - text_end \ No newline at end of file + text_end + +OakFirstBattleText: + text_far _OakFirstBattleText + text_end + +OakFirstWinText: + text_far _OakFirstWin + text_end + +ReceivedCitrinePassText: + text_far _ReceivedCitrinePassText + sound_get_item_2 + text_end + +OakCitrineExplain: + text_far _OakCitrineExplain + text_end + +OakTryAgain: + text_far _OakTryAgain + text_end + +OakBagFull: + text_far _OakBagFull + text_end + +OakBagStillFull: + text_far _OakBagStillFull + text_end diff --git a/text/RedsHouse1F.asm b/text/RedsHouse1F.asm index 0fc9d62f..dbee6718 100644 --- a/text/RedsHouse1F.asm +++ b/text/RedsHouse1F.asm @@ -48,14 +48,15 @@ _MomYoureBack:: line "forgot..." para "I received this" - line "letter from" - cont "SILPH CO." - done + line "letter from SILPH" + cont "CO. What does it" + cont "say?" + prompt ; I want the letter text to play when we use the letter, so it's gonna be like this. _ReceivedChiefLetterText:: text " received" - line "@" + line "the @" text_ram wStringBuffer text "!@" text_end @@ -69,27 +70,63 @@ _ChiefLetterText:: 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 "I have called the" + line "greatest TRAINERs" + cont "in all of KANTO!" + + para "Stronger than even" ; A sneaky trick - we can fit 18 characters, they just mess up the arrow. + line "the ELITE FOUR!" ; Thus, the para avoids the visual artefacting. para "You will come to" line "SILPH CO., yes?" para "See you then!" line " - CHIEF" - done + prompt _MomAmazing:: text "Oh! Isn't this" line "amazing, sweetie?" - para "I'm sure you'll" - line "do great!" + para "I'm sure you'll do" + line "great!" - para "I'm always here" - line "if you need me!" + para "By the way, PROF." + line "OAK was looking" + cont "for you. He said" + cont "he would be on" + cont "ROUTE 1." + + para "I wonder why..." + done + +_MomBagFull:: + text "Oh, your BAG is" + line "full! You must" + cont "have had such an" + cont "adventure!" + + para "Go upstairs and" + line "sort it out. I" ; Made me smile making this GSC mom reference. + cont "kept your room" + cont "tidy!" + done + +_MomSavedIt:: + text "Did you sort out" + line "your BAG?" + + para "You're just like" + line "when you were" + cont "ready to go!" + + para "Anyway, here's the" + line "the LETTER. What" + cont "does it say?" + prompt + +_MomBagStillFull:: + text "Silly! It's still" + line "full! Go on, sort" + cont "it out!" done diff --git a/text/Route1.asm b/text/Route1.asm index 3ec18a80..d3b45ac3 100644 --- a/text/Route1.asm +++ b/text/Route1.asm @@ -49,17 +49,19 @@ _Route1Text3:: cont "VIRIDIAN CITY" done -_OakBeforeBattleText:: - text "OAK: Oh, my!" +_OakFirstBattleText:: + text "OAK: Ah, yes!" + line "!" - para "It seems you" - line "caught me during" - cont "during my lunch" - cont "hour!" + para "Good to see you!" - para ", you" - line "have truly come" - cont "into your own!" + para "The last time we" + line "met here, you" + cont "didn't even have" + cont "your first" + cont "#MON..." + + para "Anyway! !" para "Your #MON" line "LEAGUE challenge" @@ -71,7 +73,18 @@ _OakBeforeBattleText:: para "How about we" line "spar a bit?" cont "What say you?" + done + +_OakBeforeBattleText:: + text "OAK: Oh, my!" + para "It seems you" + line "caught me during" + cont "during my lunch" + cont "hour!" + + para "Did you come for" + line "a rematch?" done _OakDefeatedText:: @@ -82,19 +95,86 @@ _OakDefeatedText:: prompt _OakWonText:: - text "Back in my day," - line "I was a serious" - cont "TRAINER!" + text "I still" + line "have it!" prompt _OakYes:: text "Back in my day," line "I was a serious" cont "TRAINER! Prepare" - cont "yourself, !" + cont "yourself!" prompt _OakNo:: - text "Maybe another" - line "time!" - done \ No newline at end of file + text "Another time," + line "then?" + done + +_OakFirstWin:: + text "OAK: I thought you" + line "would fight more" + cont "like AGATHA, but I" + cont "see myself in" + cont "you..." + + para "It reminds me of" + line "the old days..." + + para "But, now is not" + line "the time for" + cont "that." + + para "!" + line "I have a gift for" + cont "you." + prompt + +_ReceivedCitrinePassText:: + text " received" + line "the @" + text_ram wStringBuffer + text "!@" + text_end + +_OakCitrineExplain:: + text "This is a ticket" + line "to CITRINE CITY." + + para "It's a place where" + line "the best TRAINERs" + cont "go to become far" + cont "stronger." + + para "Some strange BIRD" + line "#MON will come" + cont "to roost there," + cont "but they are so" + cont "fast and vicious," + cont "few can even get" + cont "close to them..." + + para "Perhaps you can" + line "make history once" + cont "again!" + done + +_OakTryAgain:: + text "OAK: Ok! Have you" + line "made room in your" + cont "BAG?" + prompt + +_OakBagFull:: + text "Ah! Your BAG is" + line "full. Go back to" + cont "your house and" + cont "make room!" + done + +_OakBagStillFull:: + text "Ohoho, not so" + line "fast! It's still" + cont "full. Your PC can" + cont "store items, yes?" + done