From eb46fbdaf64ccd210136895ccded0be1a6a23d83 Mon Sep 17 00:00:00 2001 From: May Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:07:51 +0100 Subject: [PATCH] Pikachu/Eevee Mode Part 2 Thanks to Frrf for helping me fix the broken code I initially sent in. This commit refines the mode so that the Oak Lab cutscene is finished and the party picking process is all concrete. Also, given Surge is a fight, the S.S. Anne Pikachu rival can have Raichu, surely... Also, the UnusedNames files were, in fact, needed...otherwise, the item names get all corrupted. Probably left some code behind. So we officially have a new funky mode! --- README.md | 2 + constants/hide_show_constants.asm | 12 ++-- data/maps/hide_show_data.asm | 4 +- data/trainers/parties.asm | 6 +- engine/debug/debug_party.asm | 2 +- home/names2.asm | 2 +- main.asm | 2 +- scripts/CeruleanCity.asm | 8 +-- scripts/ChampionsRoom.asm | 8 +-- scripts/OaksLab.asm | 99 +++++++++++++++++++------------ scripts/PokemonTower2F.asm | 8 +-- scripts/Route22.asm | 14 ++--- scripts/SSAnne2F.asm | 8 +-- scripts/SilphCo7F.asm | 8 +-- 14 files changed, 104 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 69da9589..44215684 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ QoL Enhancements ==== - All 217 (current) Pokemon can be obtained without the use of trading or glitches, including Mew! - New Pokedex entries for most Pokemon are available, sourced from the original 1996 Pokedex book by Creatures Inc., restoring a ton of old Kanto lore. Thanks to [Dr. Lava and Nob Ogasawara](http://lavacutcontent.com/1996-creatures-pokedex-translation-1/) for their incredible work translating and writing about it! +- Pikachu and Eevee are now starters, featuring fully functional Rival lineups. If you pick Pikachu, he picks Eevee, and if you pick Eevee, he picks Pikachu! - Item Descriptions are available! - Press A beside surfable water, strength boulders or cut trees to use the HMs without needing to go into the Party menu. - PP symbol is displayed in the battle menu. PP displayed before, it just looks nicer now. Done by changing a straggler Japanese character. @@ -245,6 +246,7 @@ Credits * Albatross - Much of the new sprites used in the hack (Electivire, Magmortar, Rhyperior, Tangrowth, Glaceon, Sylveon...) * ZumiIsawhat? - Restorations of beta OST * Helix Chamber, RacieBeep, et al - Prototype Pokémon sprites +* Frrf - Assisting with the development of the Pikachu / Eevee Mode * Chatot4444 - Assisting with gym scaling code * Vortyne - Reused a bit of code from their pureRGB hack, which was used to assist with making MissingNo. stable. Assisted in bug fixes. * Rangi - Reused a bit of code from their Red* / Blue* hack to make HMs usable in the overworld! diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 02e2adef..accff1df 100644 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -34,10 +34,10 @@ DEF SHOW EQU $15 const HS_SAFFRON_CITY_D ; 16 const HS_SAFFRON_CITY_E ; 17 const HS_SAFFRON_CITY_F ; 18 - const HS_ROUTE_2_ITEM_1 ; 19 - const HS_ROUTE_2_ITEM_2 ; 1A - ;const HS_POKEDEX_1 ; 1B - ;const HS_POKEDEX_2 ; 1C + const HS_ROUTE_2_ITEM_1 ; 19 X + const HS_ROUTE_2_ITEM_2 ; 1A X + const HS_ROUTE_4_ITEM ; 1B X + const HS_ROUTE_9_ITEM ; 1C X const HS_ROUTE_12_SNORLAX ; 1D const HS_ROUTE_12_ITEM_1 ; 1E X const HS_ROUTE_12_ITEM_2 ; 1F X @@ -56,8 +56,8 @@ DEF SHOW EQU $15 const HS_STARTER_BALL_2 ; 2C const HS_STARTER_BALL_3 ; 2D const HS_OAKS_LAB_OAK_1 ; 2E - const HS_STARTER_BALL_4 ; 2F, Pikachu, was HS_POKEDEX_1 - const HS_STARTER_BALL_5 ; 30, Eevee, was HS_POKEDEX_2 + const HS_STARTER_BALL_4 ; 2F, was dex, pikachu + const HS_STARTER_BALL_5 ; 30, was dex, eevee const HS_OAKS_LAB_OAK_2 ; 31 const HS_VIRIDIAN_GYM_GIOVANNI ; 32 const HS_VIRIDIAN_GYM_ITEM ; 33 X diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm index 50fa7425..40523373 100644 --- a/data/maps/hide_show_data.asm +++ b/data/maps/hide_show_data.asm @@ -325,8 +325,8 @@ OaksLabHS: db OAKS_LAB, $03, SHOW db OAKS_LAB, $04, SHOW db OAKS_LAB, $05, SHOW - ;db OAKS_LAB, $06, SHOW - removed dexes - ;db OAKS_LAB, $07, SHOW + db OAKS_LAB, $07, SHOW + db OAKS_LAB, $08, SHOW db OAKS_LAB, $06, HIDE ViridianGymHS: db VIRIDIAN_GYM, $01, SHOW diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm index da2005ac..d4a78574 100644 --- a/data/trainers/parties.asm +++ b/data/trainers/parties.asm @@ -772,19 +772,19 @@ Green2Data: db $FF, 19, PIDGEOTTO, 16, RATICATE, 18, KADABRA, 20, IVYSAUR, 0 db $FF, 19, PIDGEOTTO, 16, RATICATE, 18, KADABRA, 20, CHARMELEON, 0 db $FF, 19, SPEAROW, 16, SANDSHREW, 18, RATTATA, 20, EEVEE, 0 - db $FF, 19, SPEAROW, 16, SANDSHREW, 18, RATTATA, 20, PIKACHU, 0 + db $FF, 19, SPEAROW, 16, SANDSHREW, 18, RATTATA, 20, RAICHU, 0 ; Pokémon Tower 2F db $FF, 25, PIDGEOTTO, 23, GROWLITHE, 22, EXEGGCUTE, 20, KADABRA, 25, WARTORTLE, 0 db $FF, 25, PIDGEOTTO, 23, GYARADOS, 22, GROWLITHE, 20, KADABRA, 25, IVYSAUR, 0 db $FF, 25, PIDGEOTTO, 23, EXEGGCUTE, 22, GYARADOS, 20, KADABRA, 25, CHARMELEON, 0 db $FF, 25, FEAROW, 23, VULPIX, 22, MAGNETITE, 20, SANDSHREW, 25, EEVEE, 0 - db $FF, 25, FEAROW, 23, SHELLDER, 22, VULPIX, 20, SANDSHREW, 25, PIKACHU, 0 + db $FF, 25, FEAROW, 23, SHELLDER, 22, VULPIX, 20, SANDSHREW, 25, RAICHU, 0 ; Silph Co. 7F db $FF, 37, PIDGEOT, 38, GROWLITHE, 35, EXEGGCUTE, 35, ALAKAZAM, 40, TOTARTLE, 0 db $FF, 37, PIDGEOT, 38, GYARADOS, 35, GROWLITHE, 35, ALAKAZAM, 40, VENUSAUR, 0 db $FF, 37, PIDGEOT, 38, EXEGGCUTE, 35, GYARADOS, 35, ALAKAZAM, 40, CHARIZARD, 0 db $FF, 38, SANDSLASH, 35, MAGNETON, 37, NINETALES, 35, KADABRA, 40, UMBREON, 0 - db $FF, 38, SANDSLASH, 35, CLOYSTER, 37, NINETALES, 35, KADABRA, 40, RAICHU, 0 + db $FF, 38, SANDSLASH, 35, CLOYSTER, 37, NINETALES, 35, KADABRA, 40, GOROCHU, 0 ; Route 22 db $FF, 47, MADAAMU, 45, RHYDON, 45, GROWLITHE, 47, EXEGGCUTE, 50, ALAKAZAM, 53, TOTARTLE, 0 db $FF, 47, MADAAMU, 45, RHYDON, 45, GYARADOS, 47, GROWLITHE, 50, ALAKAZAM, 53, VENUSAUR, 0 diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm index f5085e24..3df62292 100644 --- a/engine/debug/debug_party.asm +++ b/engine/debug/debug_party.asm @@ -23,7 +23,7 @@ SetIshiharaTeam: IshiharaTeam: db SCREAM_TAIL, 90 IF DEF(_DEBUG) - db KADABRA, 16 + db RAICHU, 16 ENDC db -1 ; end diff --git a/home/names2.asm b/home/names2.asm index befd50d0..c5751e0a 100644 --- a/home/names2.asm +++ b/home/names2.asm @@ -2,7 +2,7 @@ NamePointers:: ; entries correspond to *_NAME constants dw MonsterNames dw MoveNames - ;dw UnusedBadgeNames - unused + dw UnusedBadgeNames dw ItemNames dw wPartyMonOT ; player's OT names list dw wEnemyMonOT ; enemy's OT names list diff --git a/main.asm b/main.asm index f2b7508b..0e70bff2 100644 --- a/main.asm +++ b/main.asm @@ -10,7 +10,7 @@ INCLUDE "engine/movie/title.asm" INCLUDE "engine/pokemon/load_mon_data.asm" INCLUDE "data/items/prices.asm" INCLUDE "data/items/names.asm" -;INCLUDE "data/text/unused_names.asm" +INCLUDE "data/text/unused_names.asm" INCLUDE "engine/gfx/sprite_oam.asm" INCLUDE "engine/gfx/oam_dma.asm" INCLUDE "engine/link/print_waiting_text.asm" diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm index 4fdab6ab..4ff81df1 100644 --- a/scripts/CeruleanCity.asm +++ b/scripts/CeruleanCity.asm @@ -143,7 +143,7 @@ CeruleanCityScript1: ; select which team to use during the encounter ld a, [wRivalStarter] - cp STARTER1 + cp STARTER2 jr nz, .NotSquirtle ld a, $11 jr .done @@ -153,17 +153,17 @@ CeruleanCityScript1: ld a, $12 jr .done .Charmander - cp STARTER2 ; changes start here + cp STARTER1 ; changes start here ld a, $13 jr nz, .Pikachu jr .done .Pikachu ; cp STARTER4 jr nz, .Eevee - ld a, $14 + ld a, $15 jr .done .Eevee - ld a, $15 + ld a, $14 jr .done .done ld [wTrainerNo], a diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm index 702ec17f..71b8861b 100644 --- a/scripts/ChampionsRoom.asm +++ b/scripts/ChampionsRoom.asm @@ -69,7 +69,7 @@ GaryScript2: ; select which team to use during the encounter ld a, [wRivalStarter] - cp STARTER1 + cp STARTER2 jr nz, .NotSquirtle ld a, $1 jr .saveTrainerId @@ -79,17 +79,17 @@ GaryScript2: ld a, $2 jr .saveTrainerId .Charmander - cp STARTER2 ; changes start here + cp STARTER1 ; changes start here ld a, $3 jr nz, .Pikachu jr .saveTrainerId .Pikachu ; cp STARTER4 jr nz, .Eevee - ld a, $4 + ld a, $5 jr .saveTrainerId .Eevee - ld a, $5 + ld a, $4 jr .saveTrainerId .saveTrainerId ld [wTrainerNo], a diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm index 54af61ae..d2206702 100644 --- a/scripts/OaksLab.asm +++ b/scripts/OaksLab.asm @@ -205,13 +205,14 @@ OaksLabScript8: jr z, .Eevee .Charmander - ld de, .CharmanderMovement2 + ld de, .MiddleBallMovement1 ld a, [wYCoord] cp 4 ; is the player standing below the table? jr z, .moveBlue - ld de, .CharmanderMovement1 + ld de, .MiddleBallMovement2 jp .moveBlue -.CharmanderMovement1 + +.MiddleBallMovement1 db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT @@ -219,36 +220,38 @@ OaksLabScript8: db NPC_MOVEMENT_UP db -1 ; end -.CharmanderMovement2 +.MiddleBallMovement2 db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db -1 ; end .Squirtle - ld de, .SquirtleMovement2 + ld de, .RightBallMovement1 ld a, [wYCoord] cp 4 ; is the player standing below the table? jr z, .moveBlue - ld de, .CharmanderMovement1 + ld de, .RightBallMovement2 jp .moveBlue -.SquirtleMovement1 +.RightBallMovement1 db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_UP db -1 ; end - -.SquirtleMovement2 + +.RightBallMovement2 + db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db -1 ; end .Bulbasaur - ld de, .BulbasaurMovement1 + ld de, .LeftBallMovement ld a, [wXCoord] cp 9 ; is the player standing to the right of the table? jr nz, .moveBlue @@ -268,17 +271,15 @@ OaksLabScript8: ld [hl], 8 ; SPRITESTATEDATA2_MAPY inc hl ld [hl], 9 ; SPRITESTATEDATA2_MAPX - ld de, .BulbasaurMovement2 ; the rival is not currently onscreen, so account for that + ld de, .LeftBallMovement ; the rival is not currently onscreen, so account for that pop hl - jr .moveBlue + jp .moveBlue -.BulbasaurMovement1 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT -.BulbasaurMovement2 +.LeftBallMovement ; with the new layout, LeftBallMovement2 seems unnecessary and can merely be proc'd twice. db NPC_MOVEMENT_RIGHT db -1 ; end + .Pikachu ld de, .PikachuMovement1 jr z, .moveBlue @@ -338,7 +339,18 @@ OaksLabScript9: ; This is where Blue picks up the ball and removes the sprite. ld a, HS_STARTER_BALL_2 jr .hideBallAndContinue .rivalChoseBall3 + cp $4 + jr nz, .rivalDidNotChoseBall3 ld a, HS_STARTER_BALL_3 + jr .hideBallAndContinue +.rivalDidNotChoseBall3 + cp $7 + jr nz, .rivalDidNotChoseBall4 + ld a, HS_STARTER_BALL_4 + jr .hideBallAndContinue +.rivalDidNotChoseBall4 + ld a, HS_STARTER_BALL_5 + jr .hideBallAndContinue .hideBallAndContinue ld [wMissableObjectIndex], a predef HideObject @@ -410,25 +422,25 @@ OaksLabScript11: ld [wIsTrainerBattle], a ld a, OPP_RIVAL1 ld [wCurOpponent], a - ld a, [wRivalStarter] - cp STARTER1 + ld a, [wRivalStarter] + cp STARTER2 ; charmander jr nz, .NotSquirtle - ld a, $1 + ld a, $1 ; squirtle jr .done .NotSquirtle - cp STARTER3 + cp STARTER3 ; bulbasaur jr nz, .Charmander - ld a, $2 + ld a, $2 ; bulbasaur jr .done .Charmander - cp STARTER2 ; changes start here - ld a, $3 + cp STARTER1 ; changes start here jr nz, .Pikachu + ld a, $3 ; charmander jr .done .Pikachu ; - cp STARTER4 - jr nz, .Eevee + cp STARTER5 ld a, $4 + jr nz, .Eevee jr .done .Eevee ld a, $5 @@ -488,7 +500,7 @@ OaksLabScript13: ld de, .RivalExitMovement call MoveSprite ld a, [wXCoord] - cp 4 + cp 6 ; move left or right depending on where the player is standing jr nz, .moveLeft ld a, NPC_MOVEMENT_RIGHT @@ -871,31 +883,31 @@ OaksLabText4: ; For Pikachu and Eevee Mode, you only have these two. ; $5 = Pikachu ; $6 = Eevee -; I have no idea how Blue comes to the correct conclusions after, but I won't question it...for now. OaksLabTextPikachu: text_asm ld a, STARTER5 ld [wRivalStarterTemp], a - ld a, $5 + ld a, $8 ld [wRivalStarterBallSpriteIndex], a ld a, STARTER4 - ld b, $6 + ld b, $7 jr OaksLabScript_1d133 OaksLabTextEevee: text_asm ld a, STARTER4 ld [wRivalStarterTemp], a - ld a, $5 + ld a, $7 ld [wRivalStarterBallSpriteIndex], a ld a, STARTER5 - ld b, $5 + ld b, $8 + jr OaksLabScript_1d133 ; ends here OaksLabScript_1d133: - ld [wcf91], a - ld [wd11e], a - ld a, b + ld [wcf91], a ; STARTER# + ld [wd11e], a ; STARTER# + ld a, b ; BALL??? ld [wSpriteIndex], a CheckEvent EVENT_GOT_STARTER jp nz, OaksLabScript_1d22d @@ -937,9 +949,9 @@ OaksLabScript_1d157: jr z, OaksLabLookAtSquirtle cp $4 jr z, OaksLabLookAtBulbasaur - cp $5 ; these may be the wrong way around. + cp $8 ; these may be the wrong way around. jr nz, OaksLabLookAtPikachu - cp $6 ; ^ + cp $7 ; ^ jr nz, OaksLabLookAtEevee @@ -986,9 +998,9 @@ OaksLabMonChoiceMenu: ld a, [wCurrentMenuItem] and a jr nz, OaksLabMonChoiceEnd - ld a, [wcf91] + ld a, [wcf91] ; STARTER# ld [wPlayerStarter], a - ld [wd11e], a + ld [wd11e], a ; STARTER# call GetMonName ld a, [wSpriteIndex] cp $2 @@ -1001,7 +1013,18 @@ OaksLabMonChoiceMenu: ld a, HS_STARTER_BALL_2 jr .asm_1d1e5 .asm_1d1e3 + cp $4 + jr nz, .asm_ldle4 ld a, HS_STARTER_BALL_3 + jr .asm_1d1e5 +.asm_ldle4 + cp $7 + jr nz, .asm_ldle6 + ld a, HS_STARTER_BALL_4 + jr .asm_1d1e5 +.asm_ldle6 + ld a, HS_STARTER_BALL_5 + jr .asm_1d1e5 .asm_1d1e5 ld [wMissableObjectIndex], a predef HideObject diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm index 6c1f6930..be2ba1d6 100644 --- a/scripts/PokemonTower2F.asm +++ b/scripts/PokemonTower2F.asm @@ -153,7 +153,7 @@ PokemonTower2Text1: ; select which team to use during the encounter ld a, [wRivalStarter] - cp STARTER1 + cp STARTER2 jr nz, .NotSquirtle ld a, $6 jr .done @@ -163,17 +163,17 @@ PokemonTower2Text1: ld a, $7 jr .done .Charmander - cp STARTER2 ; changes start here + cp STARTER1 ; changes start here ld a, $8 jr nz, .Pikachu jr .done .Pikachu ; cp STARTER4 jr nz, .Eevee - ld a, $9 + ld a, $10 jr .done .Eevee - ld a, $10 + ld a, $9 jr .done .done ld [wTrainerNo], a diff --git a/scripts/Route22.asm b/scripts/Route22.asm index 09d723b2..e99534cb 100644 --- a/scripts/Route22.asm +++ b/scripts/Route22.asm @@ -143,11 +143,11 @@ Route22Script1: StarterMons_50faf: ; starter the rival picked, rival trainer number - db STARTER1, 6 - db STARTER2, 7 - db STARTER3, 8 - db STARTER4, 9 - db STARTER5, 10 + db STARTER1, 8 + db STARTER2, 6 + db STARTER3, 7 + db STARTER4, 10 + db STARTER5, 9 Route22Script2: ld a, [wIsInBattle] @@ -305,8 +305,8 @@ StarterMons_510d9: db STARTER2, 16 db STARTER3, 17 db STARTER1, 18 - db STARTER4, 19 - db STARTER5, 20 + db STARTER4, 20 + db STARTER5, 19 Route22Script5: ld a, [wIsInBattle] diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm index 39048d9b..d59570e1 100644 --- a/scripts/SSAnne2F.asm +++ b/scripts/SSAnne2F.asm @@ -101,7 +101,7 @@ SSAnne2Script1: ; select which team to use during the encounter ld a, [wRivalStarter] - cp STARTER1 + cp STARTER2 jr nz, .NotSquirtle ld a, $1 jr .done @@ -111,17 +111,17 @@ SSAnne2Script1: ld a, $2 jr .done .Charmander - cp STARTER2 ; changes start here + cp STARTER1 ; changes start here ld a, $3 jr nz, .Pikachu jr .done .Pikachu ; cp STARTER4 jr nz, .Eevee - ld a, $4 + ld a, $5 jr .done .Eevee - ld a, $5 + ld a, $4 jr .done .done ld [wTrainerNo], a diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm index 9fb68377..2c9fc941 100644 --- a/scripts/SilphCo7F.asm +++ b/scripts/SilphCo7F.asm @@ -186,7 +186,7 @@ SilphCo7Script3: ld a, OPP_RIVAL2 ld [wCurOpponent], a ld a, [wRivalStarter] - cp STARTER1 + cp STARTER2 jr nz, .NotSquirtle ld a, $11 jr .asm_51cc0 @@ -196,17 +196,17 @@ SilphCo7Script3: ld a, $12 jr .asm_51cc0 .Charmander - cp STARTER2 ; changes start here + cp STARTER1 ; changes start here ld a, $13 jr nz, .Pikachu jr .asm_51cc0 .Pikachu ; cp STARTER4 jr nz, .Eevee - ld a, $14 + ld a, $15 jr .asm_51cc0 .Eevee - ld a, $15 + ld a, $14 jr .asm_51cc0 .asm_51cc0 ld [wTrainerNo], a