From 9a24ec74d813abae20d5311a1f45a8c1a709fba1 Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Thu, 22 Jun 2023 18:54:25 +0100 Subject: [PATCH] Vermilion Beauty Bug Fixes & more - Vermilion Beauty no longer skips text to hand you your Pokemon - Vermilion City text boxes are fixed - Cancelling TMs and causing crashes when trying different ones is fixed (thanks to some old code by BlueZangoose, it was a vanilla bug!) - Minor enhancement to the Candy Jar that seems to make Meltan more stable. - Fixed a fallthrough error that caused Mewtwo's theme to play for every wild encounter (very cool, but also oops) --- README.md | 7 ++----- audio/play_battle_music.asm | 4 ++-- data/maps/objects/VermilionCity.asm | 18 +++++++++--------- engine/battle/core.asm | 1 + engine/items/item_effects.asm | 2 ++ scripts/VermilionCity.asm | 20 +++++++++++++------- 6 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 370d0cab..7c6abcb1 100644 --- a/README.md +++ b/README.md @@ -212,12 +212,9 @@ Known Bugs - The Tradeback Tutor doesn't work properly with Rhydon for reasons likely related to its index number of 1. - The Vermilion Passes are very unstable (Faraway warps are weird unless you battle, Citrine outright crashes). - Meltan spawned via the Mystery Box will use the moves of the Pokemon they are replacing. -- GiveMonName doesn't work properly for the Vermilion Beauty after receiving the Pokemon, jank ensues. -- Text scrolls immediately when receiving the Pokemon from the Vermilion Beauty. - HP DV does not appear to display correctly. -- Vermilion City sign near Diglett's Cave doesn't show correctly (prolly just an event thing) -- Vermilion Beauty gives wrong Pokemon when cats are chosen -- Cancelling teaching with a TM and choosing another crashes the game +- Vermilion Beauty gives the wrong Pokemon when cats are chosen, seems to be an issue with wBeautyChoice. +- GetMonName doesn't work properly for the Vermilion Beauty after receiving the Pokemon, jank ensues. Evolution Methods for new Pokemon ==== diff --git a/audio/play_battle_music.asm b/audio/play_battle_music.asm index 80613b28..2afb2352 100644 --- a/audio/play_battle_music.asm +++ b/audio/play_battle_music.asm @@ -46,9 +46,9 @@ PlayBattleMusic:: .finalBattle ld a, MUSIC_FINAL_BATTLE jr .playSong -.wildBattle - ld a, MUSIC_WILD_BATTLE .mewtwoBattle ld a, MUSIC_MEWTWO01 +.wildBattle + ld a, MUSIC_WILD_BATTLE .playSong jp PlayMusic diff --git a/data/maps/objects/VermilionCity.asm b/data/maps/objects/VermilionCity.asm index 98cd2f96..d2a0ebcb 100644 --- a/data/maps/objects/VermilionCity.asm +++ b/data/maps/objects/VermilionCity.asm @@ -14,13 +14,13 @@ VermilionCity_Object: warp_event 11, 31, FARAWAY_ISLAND_OUTSIDE, 1 def_bg_events - bg_event 27, 3, 7 ; VermilionCityText7 - bg_event 37, 13, 8 ; VermilionCityText8 - bg_event 24, 13, 9 ; MartSignText - bg_event 12, 3, 10 ; PokeCenterSignText - bg_event 7, 13, 11 ; VermilionCityText11 - bg_event 7, 19, 12 ; VermilionCityText12 - bg_event 29, 15, 13 ; VermilionCityText13 + bg_event 27, 3, 9 ; VermilionCityText7 + bg_event 37, 13, 10 ; VermilionCityText8 + bg_event 24, 13, 11 ; MartSignText + bg_event 12, 3, 12 ; PokeCenterSignText + bg_event 7, 13, 13 ; VermilionCityText11 + bg_event 7, 19, 14 ; VermilionCityText12 + bg_event 29, 15, 15 ; VermilionCityText13 def_object_events object_event 19, 7, SPRITE_BEAUTY, WALK, LEFT_RIGHT, 1 ; person @@ -29,7 +29,7 @@ VermilionCity_Object: object_event 30, 7, SPRITE_GAMBLER, STAY, NONE, 4 ; person object_event 29, 9, SPRITE_MONSTER, WALK, UP_DOWN, 5 ; person object_event 25, 27, SPRITE_SAILOR, WALK, LEFT_RIGHT, 6 ; person - object_event 31, 27, SPRITE_COOLTRAINER_F, WALK, LEFT_RIGHT, 14 ; person - object_event 12, 13, SPRITE_BEAUTY, STAY, DOWN, 15 ; person + object_event 31, 27, SPRITE_COOLTRAINER_F, WALK, LEFT_RIGHT, 7 ; person + object_event 12, 13, SPRITE_BEAUTY, STAY, DOWN, 8 ; person def_warps_to VERMILION_CITY diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 440bd2b9..e516e1cc 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6282,6 +6282,7 @@ LoadEnemyMonData: ld a, MELTAN ; Meltan is loaded... ld [wEnemyMonSpecies2], a ; Here! + ld [wcf91], a .skip ; Standard loading. ld a, [wEnemyMonSpecies2] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 4ff86351..6f458bfd 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2282,6 +2282,8 @@ ItemUseTMHM: ld a, [wCurrentMenuItem] and a jr z, .useMachine + ld a, ITEM_NAME ; tm thing from BlueZangoose/vimescarrot + ld [wNameListType], a; if you decide not to use the machine, change the list type back to item list. FIXES THE TM CRASH BUG ld a, 2 ld [wActionResultOrTookBattleTurn], a ; item not used ret diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm index bd8d6c38..2c7640d1 100644 --- a/scripts/VermilionCity.asm +++ b/scripts/VermilionCity.asm @@ -266,6 +266,8 @@ VermilionCity_TextPointers: dw VermilionCityText4 dw VermilionCityText5 dw VermilionCityText6 + dw RoingusText + dw VermilionBeauty dw VermilionCityText7 dw VermilionCityText8 dw MartSignText @@ -273,8 +275,6 @@ VermilionCity_TextPointers: dw VermilionCityText11 dw VermilionCityText12 dw VermilionCityText13 - dw RoingusText - dw VermilionBeauty VermilionCityText1: text_far _VermilionCityText1 @@ -516,16 +516,22 @@ VermilionBeauty: call GetMonName ld hl, BeautyFinish call PrintText - - lb bc, PERSIAN, 16 - ld a, [wBeautyChoice] ; Let's make sure they actually need Persian. - cp PERSIAN ; Do they? + ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip. + and a ; yep, here too. + call z, WaitForTextScrollButtonPress ; and here. + call EnableAutoTextBoxDrawing ; and here. GivePokemon is very hasty. + lb bc, PERSIAN, 16 ; because we're elitists, let's see if they chose cats first. + ld a, [wBeautyChoice] ; *sigh*, but if they're dog lovers, let's make sure they actually want Persian. + cp PERSIAN ; Do they? If yes, skip. jr z, .skip2 ; electric boogaloo lb bc, ARCANINE, 16 ; ok but skip2 means arc never gets loaded in. very good sequel. disney would NEVER. .skip2 call GivePokemon + jr nc, .done call LoadScreenTilesFromBuffer1 ; saves us from some corruption disasters if nicknaming. SetEvent EVENT_VERMILION_BEAUTY_DONE ; and now we can finally rest. + ld hl, wd72e + set 0, [hl] .done jp TextScriptEnd @@ -576,4 +582,4 @@ BeautyFinish: BeautyExplain: text_far _BeautyExplain - text_end \ No newline at end of file + text_end