jojobear, our saviour

took out 4 bugs in one go, absolute legend
This commit is contained in:
Martha Schilling 2024-01-02 11:17:58 +00:00
parent 443277ffc8
commit fe651a7668
8 changed files with 88 additions and 74 deletions

View file

@ -259,10 +259,7 @@ and more!
Known Bugs Known Bugs
==== ====
- Oak gives you the Citrine Pass even if you lost, after the screen fades to white.
- The Tradeback Tutor doesn't work properly with Rhydon for reasons likely related to its index number of 1.
- Fake Tears and Nasty Plot don't quite look right when done from the opponent's side. - Fake Tears and Nasty Plot don't quite look right when done from the opponent's side.
- The Gym Leaders on Floor 6 of Silph Gauntlet don't play the correct music in battle.
Evolution Methods for new Pokemon Evolution Methods for new Pokemon
==== ====

View file

@ -11,57 +11,71 @@ PlayBattleMusic::
and a and a
jr z, .notGymLeaderBattle jr z, .notGymLeaderBattle
ld a, MUSIC_GYM_LEADER_BATTLE ld a, MUSIC_GYM_LEADER_BATTLE
jr .playSong jp .playSong
.notGymLeaderBattle .notGymLeaderBattle
ld a, [wCurOpponent] ; This can probably be made better with a list thing but uhhh idk how to do it. seethe. ld a, [wCurOpponent] ; This can probably be made better with a list thing but uhhh idk how to do it. seethe.
cp MEWTWO ; Needs to be before OPP_ID_OFFSET to skip the wild check. cp MEWTWO ; Needs to be before OPP_ID_OFFSET to skip the wild check.
jr z, .mewtwoBattle jp z, .mewtwoBattle
cp ARTICUNO cp ARTICUNO
jr z, .legendaryBattle jp z, .legendaryBattle
cp ZAPDOS cp ZAPDOS
jr z, .legendaryBattle jp z, .legendaryBattle
cp MOLTRES cp MOLTRES
jr z, .legendaryBattle jp z, .legendaryBattle
cp MEW cp MEW
jr z, .legendaryBattle jp z, .legendaryBattle
cp OMEGADGE cp OMEGADGE
jr z, .legendaryBattle jp z, .legendaryBattle
cp SNORLAX ; Just like LGPE. Snorlax is basically a legendary in RBY, so I love this. cp SNORLAX ; Just like LGPE. Snorlax is basically a legendary in RBY, so I love this.
jr z, .legendaryBattle jp z, .legendaryBattle
cp DRATINI ; In the Tajiri lore, the Dratini family is considered legendary. Also, we have a static Dragonite. I think the appearance of Dratini in the Safari Zone with this theme could also add some reeeeeal nice hype to the whole ordeal. cp DRATINI ; In the Tajiri lore, the Dratini family is considered legendary. Also, we have a static Dragonite. I think the appearance of Dratini in the Safari Zone with this theme could also add some reeeeeal nice hype to the whole ordeal.
jr z, .legendaryBattle jp z, .legendaryBattle
cp DRAGONAIR cp DRAGONAIR
jr z, .legendaryBattle jp z, .legendaryBattle
cp DRAGONITE cp DRAGONITE
jr z, .legendaryBattle jp z, .legendaryBattle
cp ARTICUNO_G cp ARTICUNO_G
jr z, .legendaryBattle jp z, .legendaryBattle
cp ZAPDOS_G cp ZAPDOS_G
jr z, .legendaryBattle jp z, .legendaryBattle
cp MOLTRES_G cp MOLTRES_G
jr z, .legendaryBattle jp z, .legendaryBattle
cp OPP_ID_OFFSET cp OPP_ID_OFFSET
jr c, .wildBattle jp c, .wildBattle
cp OPP_YUJIROU cp OPP_YUJIROU
jr z, .Elite4Battle jp z, .GymOrElite4Battle
cp OPP_KOICHI cp OPP_KOICHI
jr z, .Elite4Battle jp z, .GymOrElite4Battle
cp OPP_BROCK ; there's probably a much better way of doing this, but this allows the Gym leader rematches in SIlph to play the Gym Battle music
jp z, .GymOrElite4Battle
cp OPP_MISTY
jp z, .GymOrElite4Battle
cp OPP_LT_SURGE
jp z, .GymOrElite4Battle
cp OPP_ERIKA
jp z, .GymOrElite4Battle
cp OPP_KOGA
jp z, .GymOrElite4Battle
cp OPP_SABRINA
jp z, .GymOrElite4Battle
cp OPP_BLAINE
jp z, .GymOrElite4Battle
cp OPP_LORELEI ; elite four now play the gym leader battle theme cp OPP_LORELEI ; elite four now play the gym leader battle theme
jr z, .Elite4Battle jr z, .GymOrElite4Battle
cp OPP_BRUNO cp OPP_BRUNO
jr z, .Elite4Battle jr z, .GymOrElite4Battle
cp OPP_AGATHA cp OPP_AGATHA
jr z, .Elite4Battle jr z, .GymOrElite4Battle
cp OPP_LANCE cp OPP_LANCE
jr z, .Elite4Battle jr z, .GymOrElite4Battle
cp OPP_PROF_OAK ; could also use the final battle theme, but I think the gym leader/elite 4 theme fits better instead. I'm happy to change this if it isn't well-liked. cp OPP_PROF_OAK ; could also use the final battle theme, but I think the gym leader/elite 4 theme fits better instead. I'm happy to change this if it isn't well-liked.
jr z, .Elite4Battle jr z, .GymOrElite4Battle
cp OPP_RIVAL3 cp OPP_RIVAL3
jr z, .finalBattle jr z, .finalBattle
cp OPP_CHIEF cp OPP_CHIEF
jr z, .finalBattle jr z, .finalBattle
jr nz, .normalTrainerBattle jr nz, .normalTrainerBattle
.Elite4Battle .GymOrElite4Battle
ld a, MUSIC_GYM_LEADER_BATTLE ld a, MUSIC_GYM_LEADER_BATTLE
jr .playSong jr .playSong
.normalTrainerBattle .normalTrainerBattle

View file

@ -5,16 +5,9 @@ RedsHouse2F_Object:
warp_event 7, 1, REDS_HOUSE_1F, 3 warp_event 7, 1, REDS_HOUSE_1F, 3
;warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief ;warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief
;warp_event 5, 1, SILPH_CO_1F, 1 ; - Go through Gauntlet ;warp_event 5, 1, SILPH_CO_1F, 1 ; - Go through Gauntlet
;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, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater
;warp_event 5, 1, CELESTE_HILL, 1 ; - Test GMolt warp_event 5, 1, HALL_OF_FAME, 1 ; Test post-game setup
;warp_event 5, 1, HALL_OF_FAME, 1 ; Test post-game setup ;warp_event 5, 1, CERULEAN_CAVE_B1F, 1 ; Test Mewtwo theme
;warp_event 5, 1, GARNET_CAVERN_B1F, 1 ; Test GCuno
;warp_event 5, 1, FARAWAY_ISLAND_INSIDE, 1 ; Test Mew
;warp_event 5, 1, GIOVANNIS_ROOM, 1 ; Test spinner tiles
;warp_event 5, 1, CINNABAR_LAB_FOSSIL_ROOM, 1 ; Test new tileset and fossils
warp_event 5, 1, CERULEAN_CAVE_B1F, 1 ; Test Mewtwo theme
def_bg_events def_bg_events

View file

@ -108,9 +108,9 @@ TestBattle:
ld [hl], a ld [hl], a
; Player's Pokemon. ; Player's Pokemon.
ld a, GLACEON ld a, GENGAR
ld [wcf91], a ld [wcf91], a
ld a, 16 ld a, 50
ld [wCurEnemyLVL], a ld [wCurEnemyLVL], a
xor a xor a
ld [wMonDataLocation], a ld [wMonDataLocation], a
@ -120,19 +120,19 @@ TestBattle:
; This function gives you a way to waste a turn, never know when you'll need it. ; This function gives you a way to waste a turn, never know when you'll need it.
; Alternatively, add a move to test. ; Alternatively, add a move to test.
ld hl, wPartyMon1Moves ld hl, wPartyMon1Moves
ld a, UPPERCUT ; Something super weak ld a, UPPERCUT ; New move animation test
ld [hli], a ld [hli], a
ld a, POWDER_SNOW ; Test new failure text ld a, POWDER_SNOW ; New move animation test
ld [hli], a ld [hli], a
ld a, LOW_KICK ; Something that'll miss easily ld a, FAKE_TEARS ; New move animation test
ld [hli], a ld [hli], a
ld a, LEER ; Skip turn ld a, NASTY_PLOT ; Skip turn, New move animation test
ld [hli], a ld [hli], a
; Opponent's Pokemon. ; Opponent's Pokemon.
ld a, BUU ; Test new theme ld a, NIDORINO
ld [wCurOpponent], a ld [wCurOpponent], a
ld a, 10 ; Set the level you want here. ld a, 50 ; Set the level you want here.
ld [wCurEnemyLVL], a ld [wCurEnemyLVL], a
predef InitOpponent predef InitOpponent
@ -145,7 +145,7 @@ TestBattle:
jr .loop jr .loop
BattleDebugItemsList: BattleDebugItemsList:
db X_ACCURACY, 99 ; Test Guillotine animation db X_ACCURACY, 99
db FULL_RESTORE, 99 db FULL_RESTORE, 99
db MAX_ELIXER, 99 db MAX_ELIXER, 99
db FULL_HEAL, 99 db FULL_HEAL, 99

View file

@ -21,12 +21,12 @@ SetIshiharaTeam:
jr .loop jr .loop
IshiharaTeam: IshiharaTeam:
db EEVEE, 90
db EXEGGUTOR_A, 90 db EXEGGUTOR_A, 90
db TRAMPEL, 90 db SCREAM_TAIL, 90
db TOTARTLE, 90
db MEWTWO, 90 db MEWTWO, 90
db ELECTRODE, 50 db RHYDON, 50
db FARFETCHD, 50 db EEVEE, 50
db -1 ; end db -1 ; end
DebugStart: DebugStart:
@ -79,15 +79,6 @@ IF DEF(_DEBUG)
ld a, 15 ld a, 15
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
; Jolteon (Pokemon 3) gets Thunderbolt.
; Adjusted for Trampel
ld hl, wPartyMon3Moves + 3
ld a, EARTHQUAKE
ld [hl], a
ld hl, wPartyMon3PP + 3
ld a, 15
ld [hl], a
; Mewtwo (Pokemon 4) has a full moveset ; Mewtwo (Pokemon 4) has a full moveset
; Use for sweeping the 4. ; Use for sweeping the 4.
@ -108,24 +99,14 @@ IF DEF(_DEBUG)
ld a, 99 ld a, 99
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
; Articuno (Pokemon 5) gets Fly.
ld hl, wPartyMon5Moves
ld a, FLY
ld [hl], a
ld hl, wPartyMon5PP
ld a, 15
ld [hl], a
; Kadabra (Pokemon 6) gets Flash and Teleport ; Eevee (Pokemon 6) gets Flash
ld hl, wPartyMon6Moves + 2 ld hl, wPartyMon6Moves + 2
ld a, FLASH ld a, FLASH
ld [hl], a ld [hl], a
ld hl, wPartyMon6PP + 2 ld hl, wPartyMon6PP + 2
ld a, 15 ld a, 15
ld [hl], a ld [hl], a
ld a, TELEPORT
ld [hl], a
; Get some debug items. ; Get some debug items.
ld hl, wNumBagItems ld hl, wNumBagItems

View file

@ -713,7 +713,6 @@ PrepareTradebackMoveList:: ; I still don't know how the fuck you're a single col
ld hl, wPartySpecies ld hl, wPartySpecies
add hl, bc add hl, bc
ld a, [hl] ; a = mon id ld a, [hl] ; a = mon id
dec a
ld [wd0b5], a ;joenote - put mon id into wram for potential later usage of GetMonHeader ld [wd0b5], a ;joenote - put mon id into wram for potential later usage of GetMonHeader
; Get pointer to evos moves data. ; Get pointer to evos moves data.
dec a dec a
@ -743,10 +742,10 @@ PrepareTradebackMoveList:: ; I still don't know how the fuck you're a single col
ld e, l ld e, l
pop hl pop hl
; Skip over evolution data. ; Skip over evolution data.
.skipEvoEntriesLoop ;.skipEvoEntriesLoop
ld a, [hli] ; ld a, [hli]
and a ; and a
jr nz, .skipEvoEntriesLoop ; jr nz, .skipEvoEntriesLoop
; Write list of relearnable moves, while keeping count along the way. ; Write list of relearnable moves, while keeping count along the way.
; de = pointer to mon's currently-known moves ; de = pointer to mon's currently-known moves
; hl = pointer to moves data for our mon ; hl = pointer to moves data for our mon

View file

@ -18,20 +18,38 @@ CeladonMansionRoofHouse_ScriptPointers:
dw JackyBeat dw JackyBeat
JackyBeat: JackyBeat:
;joenote - This script will always run after the battle with Jacky.
;Notice how there is no check to see if the player actually lost.
;Let's go ahead and add that real quick.
ld a, [wIsInBattle] ;if wIsInBattle is -1, then the battle was lost
inc a ;if A holds -1, it will increment to 0 and set the z flag (but not the c flag, dec and inc cannot affect it).
jr z, .resetMapScript ;Kick out if the player lost.
CheckEvent EVENT_BEAT_JACKY
jr nz, .resetMapScript ;Kick out if the player already beat Jacky before and got the prize.
SetEvent EVENT_BEAT_JACKY SetEvent EVENT_BEAT_JACKY
ld a, EEVEE ; Getting the Pokemon the player needs before printing the text ; ld a, EEVEE ; Getting the Pokemon the player needs before printing the text
;joenote - the above line is overwritten by the very next line.
ld a, [wPlayerStarter] ; Load the player's starter after Eevee loads. ld a, [wPlayerStarter] ; Load the player's starter after Eevee loads.
cp EEVEE ; Was your starter Eevee? cp EEVEE ; Was your starter Eevee?
ld a, EEVEE ; joenote - you can load EEVEE into A at this line,
; because the LD instruction does not alter the flag bits
jr nz, .skip ; If not, skip this. jr nz, .skip ; If not, skip this.
ld a, PIKACHU ; Load in Pikachu if true ld a, PIKACHU ; Load in Pikachu if true
.skip .skip
;joenote - If the player's starter was EEVEE, then PIKACHU goes into wd11e.
; But if it wasn't EEVEE, then the player's starter would have gone into wd11e.
; With the above alteration, EEVEE is goes into wd11e instead of the starter.
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
ld a, $1 ; Load Jacky's NPC ID ld a, $1 ; Load Jacky's NPC ID
ldh [hSpriteIndex], a ; Slap it in the index ldh [hSpriteIndex], a ; Slap it in the index
call DisplayTextID call DisplayTextID
.resetMapScript ;joenote - adding this label so we can jump to it
ld a, $0 ld a, $0
ld [wCeladonMansionRoofHouseCurScript], a ; kick the player back downstairs ld [wCeladonMansionRoofHouseCurScript], a ; kick the player back downstairs
ld [wCurMapScript], a ;joenote - really, really need to also reset the current map script
TheRetONator: ; fallthrough TheRetONator: ; fallthrough
ret ret
@ -84,6 +102,9 @@ CeladonMansion5Text1:
ld a, $1 ld a, $1
ld [wCeladonMansionRoofHouseCurScript], a ld [wCeladonMansionRoofHouseCurScript], a
ld [wCurMapScript], a ;joenote - really, really need to also set the current map script
;joenote - remember that, win or lose, the next map update after the battle
; will run index number 1 in the map script list which is JackyBeat
jr .done jr .done
.gotGift .gotGift
ld hl, JackyGift ld hl, JackyGift

View file

@ -12,6 +12,12 @@ Route1Script0:
ret ; yeah it's just a switch-off. shush. ret ; yeah it's just a switch-off. shush.
OakVibeCheck: OakVibeCheck:
;joenote - Notice how there is no check to see if the player actually lost.
;Let's go ahead and add that real quick.
ld a, [wIsInBattle] ;if wIsInBattle is -1, then the battle was lost
inc a ;if A holds -1, it will increment to 0 and set the z flag (but not the c flag, dec and inc cannot affect it).
jr z, .skip ;Kick out if the player lost.
SetEvent EVENT_BEAT_OAK_ONCE ; This is set every time, but it doesn't matter, it sticks at 1 anyway. 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? 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 nz, .skip ; Yes? Now we go to auto-ret.
@ -19,6 +25,7 @@ OakVibeCheck:
.skip .skip
ld a, $0 ld a, $0
ld [wRoute1CurScript], a ld [wRoute1CurScript], a
ld [wCurMapScript], a ;joenote - also set the value for current map script or you will have a bad time
ret ret
OakFirstWin: OakFirstWin:
@ -30,6 +37,7 @@ OakFirstWin:
.skip .skip
ld a, $0 ld a, $0
ld [wRoute1CurScript], a ld [wRoute1CurScript], a
ld [wCurMapScript], a ;joenote - also set the value for current map script or you will have a bad time
ret ret
Route1_TextPointers: Route1_TextPointers:
@ -157,6 +165,7 @@ Route1OakText:
ld a, $1 ld a, $1
ld [wRoute1CurScript], a ld [wRoute1CurScript], a
ld [wCurMapScript], a ;joenote - also set the value for current map script or you will have a bad time
.done .done
jp TextScriptEnd jp TextScriptEnd