From 3e542c959ea7c0739c981f3c263941299375384f Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Thu, 13 Jul 2023 03:05:19 +0100 Subject: [PATCH] Yujirou Enhancements It felt weird that Koichi would have Gym Scaling, but Yujirou would not. So, I changed that to be a thing. I pegged his level scaling to Brock's, mainly because Normal-types are absolutely ballbustingly broken in this game and it makes sense from a progression standpoint. In doing that, I realised some variety in scaling (like, -1 +1, occasional 2 type stuff) could be interesting. I also fixed multiple bugs; - Gym Trainers correctly reset when you leave; no visible effect except to me debugging. - Above also fixed Yujirou not having his loss sequence after, well, losing. Reported by shawesome. - In fact, Yujirou will even display his loss text after losing, something I learned from doing Professor Oak's new Citrine Pass functionality. --- README.md | 27 +++++++++++++++------------ data/maps/objects/ViridianPreGym.asm | 14 +++++++------- data/trainers/scaled_parties.asm | 10 +++++++++- engine/debug/debug_party.asm | 6 +++--- layout.link | 4 ++-- scripts/ViridianPreGym.asm | 25 ++++++++++++++++++------- 6 files changed, 54 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 7f6d2575..3b30c758 100644 --- a/README.md +++ b/README.md @@ -59,16 +59,17 @@ Naturally, these types get appropriate moves. They are currently distributed to New Items: ==== There are some new items here, with the aim of accomodating new Pokemon, adding features, and acting as methods of getting to new locations. -- To accomodate Meltan, the Mystery Box from Pokemon GO is featured. When used, wild encounters are replaced with Meltan until one leaves the location. - - The Candy Jar is a new key item that allows Meltan Candy to be collected. Defeating a Meltan rewards 10 Candy, and once 400 are collected, it turns into an evolution item to evolve Meltan into Melmetal. +- The Wing Fossil is a new item that allows Aerodactyl to be revived, as the Old Amber is instead used for Decilla. It's hidden in Mt. Moon. +- The Tea from FireRed/LeafGreen and Let's Go Pikachu/Eevee is added, allowing Saffron access for free. The guards now imply they want a cup of tea. + - This also accomodates Mt. Moon Square's shop, which would otherwise break progression due to its contents. Hint hint! - The Ice, Poison and Heart Stones have been added, the latter two being from the SpaceWorld '97 demo. - Additional evolution items include the Protector, Black Augurite, Up-Grade, Dubious Disc, and the Metal Coat. +- To accomodate Meltan, the Mystery Box from Pokemon GO is featured. When used, wild encounters are replaced with Meltan until one leaves the location. It can be obtained in the Safari Zone. + - The Candy Jar is a new key item that allows Meltan Candy to be collected. Defeating a Meltan rewards 10 Candy, and once 400 are collected, it turns into an evolution item to evolve Meltan into Melmetal. It can be obtained in the Indigo Plateau Lobby. - The Bottle Cap has been added alongside a Hyper Training feature, acting as effectively a Gold Bottle Cap. - The Old Sea Map has been added, giving access to Faraway Island and Mew. -- The Citrine Pass has been added, allowing access to a new post-game area based on the unused "C" map. -- The Wing Fossil is a new item that allows Aerodactyl to be revived, as the Old Amber is instead used for Decilla. -- The Tea from FireRed/LeafGreen and Let's Go Pikachu/Eevee is added, allowing Saffron access for free. The guards now imply they want a cup of tea. - - This also accomodates Mt. Moon Square's shop, which would otherwise break progression. +- The Silph Letter allows access to a new post-game challenge, obtained after completing the game. +- The Citrine Pass has been added, allowing access to a new post-game area based on the unused "C" map. It can be obtained in the post-game. New Areas ==== @@ -112,7 +113,7 @@ Improved Areas - Viridian Gym now has a minor new area once you make Giovanni leave. - Various Move Tutors from FireRed and LeafGreen have been distributed around the region, instead giving their respective TMs. - The S.S. Anne now returns after getting the Marsh Badge and features trades for Galarian forms & Evolutions, as well as Paldean Tauros. -- The healer from the S.S. Anne is now featured in the rightmost room on 1F. +- The healer from the S.S. Anne is now featured in the rightmost room on 1F. It works identically to in FRLG. - A few existing areas have unique palettes to make them stand out: - The Game Corner has a new palette, meant to reflect the bright, exciting colours that casinos and pachinko parlours tend to have. - The Seafoam Islands have a cyan-coloured palette to make it seem more like an ice cave. Lorelei's room also has it. @@ -341,16 +342,16 @@ If you use our implementations of anything at all, it is encouraged to submit Pu * pret et al - Pokémon Red and Blue Disassembly Project, many tutorials helped us! * ausma - Showdown Mod assistance * Paulluxx - Showdown Mod assistance -* DuoM2 - Showdown Mod assistance +* DuoM2 - Showdown Mod assistance * Albatross - Many of the new sprites used in the hack (A significant number of post-Gen 1 evolutions, all regional variants, Meltan and Carapthor lines, etc.) * BlueZangoose / Vimescarrot - Pokemon box expansion, Instatext option, general assistance. -* Frrf - Assisting with the development of the Pikachu / Eevee Mode, debugging * LuciShrimp - Mewtwo & Galarian Bird custom battle music * dannye33 - Assisting with crysaudio implementation +* Frrf - Assisting with the development of the Pikachu / Eevee Mode + 5 Starters scenes in Oak's Lab, debugging * erosunica - Assistance with developing Celadon University & Citrine City, plus sources for various subjects. -* Chatot4444 - Assisting with gym scaling code -* Enigami - Reworking the Battle Tent's RestoreTeam code to make it work properly -* ZumiIsawhat? - Restorations of beta OST +* Chatot4444 - Assisting with gym scaling code. +* Enigami - Reworking the Battle Tent's RestoreTeam code to make it work properly. +* ZumiIsawhat? - Restorations of beta OST. * FrenchOrange - Reconstructions of various overworld beta sprites. * Helix Chamber, RacieBeep, loumilouminosus, Orchid, GBCRetro, & catstorm26 - Prototype Pokémon sprites * Vortiene - Reused a bit of code from their pureRGB hack. Assisted in bug fixes. @@ -358,7 +359,9 @@ If you use our implementations of anything at all, it is encouraged to submit Pu * jojobear13 & Mateo - HP/StatExp display, move deleter, & move relearner functionality from Shin Pokered, followed [this guide](https://github.com/jojobear13/shinpokered/blob/master/how%20to%20guides/how%20to%20add%20the%20move%20relearner%26deleter.txt). Tweaks were made to make it compatible with the pokered version we worked off of. * Rangi - Reused a bit of code from their Red* / Blue* hack to make HMs usable in the overworld! * wrulfy - Technical advice +* suloku - Technical advice regarding setting where you spawn after beating the Elite Four. * 大吟醸 (Daiginjo) - Assistance in translating the Tamamushi University Student Book, allowing for an accurate adaptation of the location. +* ViWalls - Extremely early adopter of the hack who repeatedly reported bugs and gave general opinions. Original README.md proceeding; # Pokémon Red and Blue [![Build Status][ci-badge]][ci] diff --git a/data/maps/objects/ViridianPreGym.asm b/data/maps/objects/ViridianPreGym.asm index a0a5dfd5..7e79e57f 100644 --- a/data/maps/objects/ViridianPreGym.asm +++ b/data/maps/objects/ViridianPreGym.asm @@ -6,17 +6,17 @@ ViridianPreGym_Object: warp_event 4, 13, LAST_MAP, 7 def_bg_events - bg_event 2, 7, 6 ; League poster - bg_event 4, 0, 7 ; Trainer Tips 1 - bg_event 5, 0, 8 ; Trainer Tips 2 - bg_event 8, 6, 9 ; PC - bg_event 3, 7, 10 ; Rhydon Statue - bg_event 6, 7, 11 ; Rhydon Statue + bg_event 2, 7, 5 ; League poster + bg_event 4, 0, 6 ; Trainer Tips 1 + bg_event 5, 0, 7 ; Trainer Tips 2 + bg_event 8, 6, 8 ; PC + bg_event 3, 7, 9 ; Rhydon Statue + bg_event 6, 7, 10 ; Rhydon Statue def_object_events object_event 6, 9, SPRITE_GIRL, STAY, LEFT, 1, OPP_STUDENT, 1 ; person, Trainer 1 object_event 3, 8, SPRITE_GIRL, STAY, RIGHT, 2, OPP_STUDENT, 2 ; person, Trainer 2 object_event 5, 2, SPRITE_YOUNGSTER, STAY, NONE, 3 ; person, Yujirou - object_event 1, 6, SPRITE_GYM_GUIDE, STAY, DOWN, 5 ; person + object_event 1, 6, SPRITE_GYM_GUIDE, STAY, DOWN, 4 ; person def_warps_to VIRIDIAN_PRE_GYM \ No newline at end of file diff --git a/data/trainers/scaled_parties.asm b/data/trainers/scaled_parties.asm index e810b48c..2cd21aca 100644 --- a/data/trainers/scaled_parties.asm +++ b/data/trainers/scaled_parties.asm @@ -107,7 +107,15 @@ LanceData: db $FF, 74, CRYITHAN, 73, GYARADOS, 73, EXEGGUTOR_A, 75, KINGDRA, 75, AERODACTYL, 77, DRAGONITE, 0 YujirouData: ; was unused juggler - db $FF, 4, KONYA, 5, RATTATA, 9, LICKITUNG, 0 + db $FF, 4, KONYA, 5, RATTATA, 8, LICKITUNG, 0 ; 0 + db $FF, 19, MEOWTH, 18, RATICATE, 19, FARFETCHD, 21, LICKITUNG, 0 ; 1 + db $FF, 22, MEOWTH, 21, RATICATE, 21, FARFETCHD, 23, JIGGLYPUFF, 24, LICKITUNG, 0 ; 2 + db $FF, 29, PERSIAN, 28, RATICATE, 28, FARFETCHD, 29, JIGGLYPUFF, 31, LICKITUNG, 0 ; 3 + db $FF, 38, PERSIAN, 37, RATICATE, 37, MADAAMU, 38, CHANSEY, 40, LICKITUNG, 0, ; 4 + db $FF, 41, PERSIAN, 40, TAUROS, 40, MADAAMU, 41, CHANSEY, 43, LICKITUNG, 0 ; 5 + db $FF, 45, PERSIAN, 44, TAUROS, 44, MADAAMU, 45, BLISSEY, 47, LICKILICKY, 0 ; 6 + db $FF, 47, PERSIAN, 46, TAUROS, 46, MADAAMU, 48, BLISSEY, 48, SNORLAX, 50, LICKILICKY, 0 ; 7 + db $FF, 47, PERSIAN, 46, TAUROS, 46, MADAAMU, 48, BLISSEY, 48, SNORLAX, 50, LICKILICKY, 0 ; 8 (clone for scaling reasons) ; post-game rematch team db $FF, 66, PERSIAN, 67, TAUROS, 67, MADAAMU, 66, BLISSEY, 67, SNORLAX, 70, LICKILICKY, 0 diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm index 0dd9d63f..630a4c57 100644 --- a/engine/debug/debug_party.asm +++ b/engine/debug/debug_party.asm @@ -57,9 +57,6 @@ IF DEF(_DEBUG) ld a, GROWLITHE ld [wBeautyChoice], a - ; Test Post-Game Functionality. - SetEvent EVENT_POST_GAME_ATTAINED - ; Get all badges except Earth Badge. ld a, ~(1 << BIT_EARTHBADGE) ld [wObtainedBadges], a @@ -155,6 +152,9 @@ IF DEF(_DEBUG) ;ld hl, wPokedexSeen ;call DebugSetPokedexEntries SetEvent EVENT_GOT_POKEDEX + + ; Test Post-Game Functionality. + ;SetEvent EVENT_POST_GAME_ATTAINED ; Rival chose Pikachu, ; Player chose Eevee. diff --git a/layout.link b/layout.link index 19ebf091..8a16940a 100644 --- a/layout.link +++ b/layout.link @@ -110,14 +110,14 @@ ROMX $14 ROMX $15 "Maps 11" "Battle Engine 9" - "Maps 12" ROMX $16 + "Maps 12" "Maps 13" "Battle Engine 10" "Maps 14" "Saffron Guards" - "Diploma" ROMX $17 + "Diploma" "Maps 15" "Starter Dex" "Maps 16" diff --git a/scripts/ViridianPreGym.asm b/scripts/ViridianPreGym.asm index 0eb2375b..26ada98f 100644 --- a/scripts/ViridianPreGym.asm +++ b/scripts/ViridianPreGym.asm @@ -26,16 +26,18 @@ ViridianGymYujirouPostBattle: jp z, ViridianGymResetScripts ld a, $f0 ld [wJoyIgnore], a - -YujirouHasBeenBeaten: - SetEvent EVENT_BEAT_YUJIROU, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1 + + SetEvents EVENT_BEAT_YUJIROU, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1 ; Needs to be set here for the correct text to pop up. + ld a, $3 + ld [hSpriteIndex], a + call DisplayTextID + jp ViridianPreGymResetScripts ViridianPreGym_TextPointers: dw ViridianPreGymText1 dw ViridianPreGymText2 dw YujirouText - dw YujirouHasBeenBeaten dw ViridianPreGymGuide dw ViridianPreGymSign1 dw ViridianPreGymSign2 @@ -72,15 +74,24 @@ YujirouText: set 6, [hl] set 7, [hl] call Delay3 + + ; gym scaling spaghetti code begins here - remove initial parameters as we're making our own ld a, OPP_YUJIROU ld [wCurOpponent], a - ld a, 1 + + ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help. + ld b, 1 + call CountSetBits + ld a, [wNumSetBits] + inc a ld [wTrainerNo], a + + ld a, 1 ld [wIsTrainerBattle], a ld hl, YujirouLoseText ld de, YujirouWinText call SaveEndBattleTextPointers - ld a, $2 + ld a, $3 ld [wViridianPreGymCurScript], a ld [wCurMapScript], a jr .done @@ -100,7 +111,7 @@ YujirouText: call EngageMapTrainer ld a, OPP_YUJIROU ld [wCurOpponent], a - ld a, 2 + ld a, 10 ld [wTrainerNo], a ld a, 1 ld [wIsTrainerBattle], a