From 47f2683d852d9f8a9aa39b272c667c732f0f16bd Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:39:24 +0100 Subject: [PATCH] Finish Chief, bug fixes This finishes Chief's event, with all the necessary components for the post-game Mewtwo fight sorted as well. I added an event the Master Ball sets for modular monologue text, for improved immersion. I have also fixed some bugs; - Fixed the oft-reported walking in trees bug in the Forest tileset. - Fixed the Oak's lab computer issue by just...removing the computer. I made the map symmetrical instead, feels a lot better to look at, at least for me. I think it was meant to have an event on it or something, but I couldn't find anything, felt like I was being gaslit. - Hopefully fixed the issue with the border blocks going weird after saving and resetting, by making the tileset directly point to the gym one, which Oak is meant to use. I am not sure how that glitch happened for ViWalls. - Fixed the Viridian Pre-Gym text scrolling issue. I still cannot replicate the crash bugs that some people have been experiencing and don't see anything that could be causing it. I also changed Trampel in Victory Road to Steelix, as mentioned by Gogocrafter. --- constants/event_constants.asm | 3 +- data/maps/headers/OaksLab.asm | 2 +- data/maps/objects/RedsHouse2F.asm | 4 +- data/maps/objects/SaffronCity.asm | 1 + data/maps/objects/SilphGauntlet7F.asm | 5 +- data/tilesets/collision_tile_ids.asm | 2 +- data/wild/maps/VictoryRoad1F.asm | 2 +- data/wild/maps/VictoryRoad2F.asm | 2 +- data/wild/maps/VictoryRoad3F.asm | 2 +- engine/items/item_effects.asm | 9 +++ gfx/blocksets/forest.bst | Bin 2064 -> 2064 bytes maps/OaksLab.blk | 2 +- scripts/SilphGauntlet7F.asm | 95 ++++++++++++++++++++------ text/CeladonUniversityInside.asm | 10 ++- text/SaffronGym.asm | 5 ++ text/SilphGauntlet7F.asm | 62 ++++++++++++++--- text/ViridianPreGym.asm | 2 +- 17 files changed, 162 insertions(+), 46 deletions(-) diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 915c8af9..d565c73d 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -14,7 +14,8 @@ const EVENT_BEAT_OAK_ONCE const EVENT_BEAT_JACKY const EVENT_GOT_MANSION_GIFT - const_skip 11 + const EVENT_USED_MASTER_BALL ; Used to determine Chief's dialogue in the end-game. + const_skip 10 const EVENT_GOT_TOWN_MAP const EVENT_ENTERED_BLUES_HOUSE const EVENT_DAISY_WALKING diff --git a/data/maps/headers/OaksLab.asm b/data/maps/headers/OaksLab.asm index 44483e93..a31d9d37 100644 --- a/data/maps/headers/OaksLab.asm +++ b/data/maps/headers/OaksLab.asm @@ -1,2 +1,2 @@ - map_header OaksLab, OAKS_LAB, DOJO, 0 + map_header OaksLab, OAKS_LAB, GYM, 0 end_map_header diff --git a/data/maps/objects/RedsHouse2F.asm b/data/maps/objects/RedsHouse2F.asm index 505a066a..d57392b7 100644 --- a/data/maps/objects/RedsHouse2F.asm +++ b/data/maps/objects/RedsHouse2F.asm @@ -3,8 +3,8 @@ RedsHouse2F_Object: def_warp_events warp_event 7, 1, REDS_HOUSE_1F, 3 - ;warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief - warp_event 5, 1, SILPH_CO_11F, 2 ; - Test J&J, Omega, & Giovanni. To test the Omega refight, change to SHOW in hide/show data, and set warp ID to 1. + warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief + ;warp_event 5, 1, SILPH_CO_11F, 2 ; - Test J&J, Omega, & Giovanni. To test the Omega refight, change to SHOW in hide/show data, and set warp ID to 1. ;warp_event 5, 1, ROCKET_HIDEOUT_B4F, 2 ; - Test Giovanni 1 ;warp_event 5, 1, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater ;warp_event 5, 1, CELESTE_HILL, 1 ; - Test GMolt diff --git a/data/maps/objects/SaffronCity.asm b/data/maps/objects/SaffronCity.asm index d1f52675..a5a63bef 100644 --- a/data/maps/objects/SaffronCity.asm +++ b/data/maps/objects/SaffronCity.asm @@ -10,6 +10,7 @@ SaffronCity_Object: warp_event 18, 21, SILPH_CO_1F, 1 warp_event 9, 29, SAFFRON_POKECENTER, 1 warp_event 29, 29, MR_PSYCHICS_HOUSE, 1 + warp_event 18, 22, SILPH_GAUNTLET_7F, 1 ; Not actually usable. Used as a target for the warp in the gauntlet. def_bg_events bg_event 17, 5, 16 ; SaffronCityText16 diff --git a/data/maps/objects/SilphGauntlet7F.asm b/data/maps/objects/SilphGauntlet7F.asm index 1828b48c..c96929d6 100644 --- a/data/maps/objects/SilphGauntlet7F.asm +++ b/data/maps/objects/SilphGauntlet7F.asm @@ -2,9 +2,12 @@ SilphGauntlet7F_Object: db $d ; border block def_warp_events - warp_event 5, 6, SAFFRON_CITY, 1 + warp_event 5, 6, SAFFRON_CITY, 9 def_bg_events + bg_event 2, 2, 2 ; Chief's PC + bg_event 2, 0, 3 ; Chief's first painting + bg_event 8, 0, 4 ; Chief's second painting def_object_events object_event 5, 1, SPRITE_SILPH_PRESIDENT, STAY, DOWN, 1 ; person diff --git a/data/tilesets/collision_tile_ids.asm b/data/tilesets/collision_tile_ids.asm index 3d1b7ea6..752399c1 100644 --- a/data/tilesets/collision_tile_ids.asm +++ b/data/tilesets/collision_tile_ids.asm @@ -24,7 +24,7 @@ Gym_Coll:: coll_tiles $11, $16, $19, $2b, $3c, $3d, $3f, $4a, $4c, $4d, $03 Forest_Coll:: - coll_tiles $1e, $20, $2e, $30, $34, $37, $39, $3a, $40, $51, $52, $5a, $5c, $5e, $5f, $00, $30 + coll_tiles $1e, $20, $2e, $30, $34, $37, $39, $3a, $40, $51, $52, $5a, $5c, $5e, $5f, $30 House_Coll:: coll_tiles $01, $12, $14, $28, $32, $37, $44, $54, $5c diff --git a/data/wild/maps/VictoryRoad1F.asm b/data/wild/maps/VictoryRoad1F.asm index 813bdf21..91f8a289 100644 --- a/data/wild/maps/VictoryRoad1F.asm +++ b/data/wild/maps/VictoryRoad1F.asm @@ -1,7 +1,7 @@ VictoryRoad1FWildMons: def_grass_wildmons 15 ; encounter rate db 34, MACHOKE - db 36, RHYDON + db 36, STEELIX db 32, GOLBAT db 36, SANDSLASH db 39, SANDSLASH diff --git a/data/wild/maps/VictoryRoad2F.asm b/data/wild/maps/VictoryRoad2F.asm index 365c2c27..5c032817 100644 --- a/data/wild/maps/VictoryRoad2F.asm +++ b/data/wild/maps/VictoryRoad2F.asm @@ -1,7 +1,7 @@ VictoryRoad2FWildMons: def_grass_wildmons 10 ; encounter rate db 32, MACHOKE - db 34, TRAMPEL + db 34, STEELIX db 36, GOLBAT db 36, SANDSLASH db 39, SANDSLASH diff --git a/data/wild/maps/VictoryRoad3F.asm b/data/wild/maps/VictoryRoad3F.asm index 283959ec..b8c44de3 100644 --- a/data/wild/maps/VictoryRoad3F.asm +++ b/data/wild/maps/VictoryRoad3F.asm @@ -1,7 +1,7 @@ VictoryRoad3FWildMons: def_grass_wildmons 15 ; encounter rate db 34, MACHOKE - db 36, TRAMPEL + db 36, STEELIX db 32, GOLBAT db 42, SANDSLASH db 40, VENOMOTH diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f54e35c9..8a221887 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -172,7 +172,16 @@ ItemUseBall: and a jp z, ItemUseNotTime +; By this point, the Master Ball is possible to use. +; This changes Chief's dialogue in the end-game. + ld hl, wcf91 ; Get item ID + ld a, [hl] ; Ayup + cp MASTER_BALL ; Is it the Master Ball fam? + jr nz, .masterBallSkip ; Aye? + SetEvent EVENT_USED_MASTER_BALL ; Aye. + ; Balls can't catch trainers' Pokémon. +.masterBallSkip ; Get kicked over here if it's not. dec a jp nz, ThrowBallAtTrainerMon diff --git a/gfx/blocksets/forest.bst b/gfx/blocksets/forest.bst index 3ee0477d1a5fe762879e7ba4f7dac22509e03dc3..8ab5e3385ec7d07bbde4979fa3c386f3b3f899c1 100644 GIT binary patch delta 19 acmbOrFhO8~J|n|MgK$PhhRq#}9c%zJ(**?p delta 19 acmbOrFhO8~KBK`#gK$PhgUua`9c%zNGX-S; diff --git a/maps/OaksLab.blk b/maps/OaksLab.blk index 92ec9513..0e87062e 100644 --- a/maps/OaksLab.blk +++ b/maps/OaksLab.blk @@ -1 +1 @@ -ehhghhhkijijmnmnhhhhhh \ No newline at end of file +hhhghhhijijmnmnhhhhhh \ No newline at end of file diff --git a/scripts/SilphGauntlet7F.asm b/scripts/SilphGauntlet7F.asm index 38138189..57739ae7 100644 --- a/scripts/SilphGauntlet7F.asm +++ b/scripts/SilphGauntlet7F.asm @@ -13,16 +13,22 @@ ResetChiefScript: ret SilphGauntlet7F_ScriptPointers: - ;dw ChiefScript0 dw ChiefScript1 dw ChiefScript2 dw ChiefScript3 - dw ChiefScript10 - -ChiefScript0: ; this is used in the champion script but it doesn't seem to be needed here. - ret + dw ChiefScript4 ChiefScript1: + CheckEvent EVENT_BEAT_CHIEF + jr nz, .skip + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + call UpdateSprites + jr MovePlayerToChief +.skip + ret + +MovePlayerToChief: ld a, $ff ld [wJoyIgnore], a ld hl, wSimulatedJoypadStatesEnd @@ -31,8 +37,9 @@ ChiefScript1: dec a ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld a, $2 + ld a, $1 ld [wSilphGauntlet7FCurScript], a + ld [wCurMapScript], a ret ChiefEntrance_RLEMovement: @@ -45,15 +52,16 @@ ChiefScript2: ret nz call Delay3 xor a + ld [wJoyIgnore], a ld hl, wOptions res 7, [hl] ; Turn on battle animations like with Blue - ;ld a, $1 - ;ldh [hSpriteIndexOrTextID], a - ;call DisplayTextID - ld hl, ChiefText1 - call PrintText + ld a, $1 + ldh [hSpriteIndexOrTextID], a + call DisplayTextID + ld a, $2 + ld [wSilphGauntlet7FCurScript], a ret ChiefScript3: @@ -72,18 +80,24 @@ ChiefScript3: ld a, $1 ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF - ld a, $4 + ld a, $3 ld [wSilphGauntlet7FCurScript], a jp TextScriptEnd -ChiefScript10: +ChiefScript4: ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a ld [wJoyIgnore], a + + ; Grant Mewtwo access + ld a, HS_CERULEAN_CAVE_GUY + ld [wMissableObjectIndex], a + predef HideObject + ld a, $0 - ld [wChampionsRoomCurScript], a + ld [wSilphGauntlet7FCurScript], a ret ChiefScript_That_Seems_Needed: @@ -96,16 +110,28 @@ ChiefScript_That_Seems_Needed: SilphGauntlet7F_TextPointers: dw ChiefText1 -; dw ChiefText2 + dw ChiefPC + dw ChiefPainting1 + dw ChiefPainting2 ChiefText1: text_asm - CheckEvent EVENT_BEAT_CHIEF - ld hl, ChiefAfterBattleText - jr z, .printText + CheckEvent EVENT_BEAT_CHIEF ; Check if Chief was beaten + jr nz, .chiefBeaten ; If Chief has been beaten, skip the trainer loading + ; standard processing ld hl, ChiefMonologue -.printText 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. + + CheckEvent EVENT_USED_MASTER_BALL ; Check if the Master Ball has been used. + ld hl, ChiefMonologueMasterBallNotUsed ; Load not used by default. + jr z, .masterBallSkip ; In which case, we can skip. + ld hl, ChiefMonologueMasterBallUsed ; If you get here, it's been used. +.masterBallSkip ; Now if it's been used, fall through to here. + call PrintText ; Now print the text. ld c, BANK(Music_MeetEvilTrainer) ld a, MUSIC_MEET_EVIL_TRAINER @@ -125,12 +151,26 @@ ChiefText1: ld hl, ChiefDefeatedText ld de, ChiefVictoryText call SaveEndBattleTextPointers + jr .done +.chiefBeaten + ld hl, ChiefAfterBattleText + call PrintText + ; fallthrough +.done jp TextScriptEnd ChiefMonologue: text_far _ChiefMonologue text_end +ChiefMonologueMasterBallUsed: + text_far _ChiefMonologueMasterBallUsed + text_end + +ChiefMonologueMasterBallNotUsed: + text_far _ChiefMonologueMasterBallNotUsed + text_end + ChiefDefeatedText: text_far _ChiefDefeatedText text_end @@ -143,6 +183,21 @@ ChiefAfterBattleText: text_far _ChiefAfterBattleText text_end +ChiefPC: + text_far _ChiefPCText + text_end + +ChiefPainting1: + text_far _ChiefPainting1 + text_end + +ChiefPainting2: + text_far _ChiefPainting2 + text_end + +; Originally, Chief was going to give you the Candy Jar. +; But this would relegate Melmetal to the post-game, which feels wrong. +; Instead, he gives you access to Mewtwo. ;ChiefText2: ; text_asm ; CheckEvent EVENT_GOT_CANDY_JAR @@ -182,5 +237,3 @@ ChiefAfterBattleText: ;CandyJarNoRoomText: ; text_far _CandyJarNoRoomText ; text_end - -; text_end diff --git a/text/CeladonUniversityInside.asm b/text/CeladonUniversityInside.asm index a82faa07..aeeb3bf7 100644 --- a/text/CeladonUniversityInside.asm +++ b/text/CeladonUniversityInside.asm @@ -16,12 +16,10 @@ _CeladonUniversityInsideText2:: done _CeladonUniversityInsideText3:: - text "Tremors keep" - line "happening in" - cont "VICTORY ROAD." - - para "WESTWOOD, can you" - line "meet me at SILPH?" + text "It's a paper" + line "speculating on" + cont "the idea of a" + cont "man-made #MON." done diff --git a/text/SaffronGym.asm b/text/SaffronGym.asm index 6d682cf1..0838a410 100644 --- a/text/SaffronGym.asm +++ b/text/SaffronGym.asm @@ -58,6 +58,11 @@ _TM46ExplanationText:: line "It uses powerful" cont "psychic waves to" cont "inflict damage!" + + para "Also..." + + para "I sense a ship has" ; This is the use for the badge now, no? + line "returned for you." done _TM46NoRoomText:: diff --git a/text/SilphGauntlet7F.asm b/text/SilphGauntlet7F.asm index d569f09d..0f6ffd34 100644 --- a/text/SilphGauntlet7F.asm +++ b/text/SilphGauntlet7F.asm @@ -13,7 +13,7 @@ _ChiefMonologue:: cont "for the ultimate" cont "#MON, aren't" cont "you?" - + para "That MASTER" line "BALL... I should" cont "never have given" @@ -22,19 +22,39 @@ _ChiefMonologue:: cont "GIOVANNI gone," cont "our company is" cont "going under!" + prompt - para "Now there's only" +_ChiefMonologueMasterBallNotUsed:: + text "Now there's only" line "one way to catch" cont "MEWTWO, and it's" cont "in your hands!" - para "! Give me" - line "that BALL!" + para "!" + + para "Give me that BALL!" + prompt + +_ChiefMonologueMasterBallUsed:: + text "...what? You used" + line "the MASTER BALL?!" + + para "You stupid child!" + line "I can't believe" + cont "this!" + + para "Argh..." + + para "!" + line "You...you..." ; Trying to emphasise rage. I think this is the best we can get. + + para "You are in for" + line "a world of hurt!" ; Like Giovanni, but with a slightly more pompous tone in using "hurt". prompt _ChiefDefeatedText:: - text "CHIEF: No!" - line "I...I..." + text "No! I..." + line "I..." prompt _ChiefVictoryText:: @@ -49,8 +69,8 @@ _ChiefAfterBattleText:: cont "GIOVANNI has to" cont "be stronger than" cont "me. No product" - cont "I have can" - cont "trounce you." + cont "I have is capable" + cont "of trouncing you." para "I wanted to make" line "an ultimate BALL" @@ -73,3 +93,29 @@ _ChiefAfterBattleText:: done +_ChiefPCText:: + text "It's a PC with" + line "blueprints for" + cont "OMEGA!" + + para "It was meant" + line "for..." + + para "The CELADON GAME" + line "CORNER?!" + done + +_ChiefPainting1:: + text "It's a painting" + line "of an unknown" + cont "#MON." + + para "It's small and" + line "has large feet." + done + +_ChiefPainting2:: + text "It's a picture" + line "of GYAOON, an" + cont "extinct #MON!" + done diff --git a/text/ViridianPreGym.asm b/text/ViridianPreGym.asm index d4fa3f3a..9f91a8df 100644 --- a/text/ViridianPreGym.asm +++ b/text/ViridianPreGym.asm @@ -149,7 +149,7 @@ _ViridianPreGymSign3:: line "after battles." para "It can also be" - cont "cured by swapping" + line "cured by swapping" cont "your #MON during" cont "the battle!" done