Bug fix, ball miss text enhancements

This fixes a bug where Meltans would invade Trainer Battles under the effects of the Mystery Box.

I also did some minor groundwork where the Candy Jar check is a function. I intend to change it so that catching a Pokemon would incur it too. I ended up with glitches when doing that, though.

The "ball miss" message is now modular, with a new message being spat out when not in the Safari Zone. The message talks about it being "too strong" and "breaking the ball", making it far more intense and matching some early anime scenes.
This commit is contained in:
Llinos Evans 2023-06-04 10:52:00 +01:00
parent d07897bb4f
commit 0aa26308f2
6 changed files with 46 additions and 14 deletions

View file

@ -120,6 +120,7 @@ QoL Enhancements
- The Old and Good Rods have been removed, and the Super Rod, now called the Fishing Rod, is obtained in Pewter City. All fishing encounter tables have been altered to roughly match the levels of the surrounding routes. - The Old and Good Rods have been removed, and the Super Rod, now called the Fishing Rod, is obtained in Pewter City. All fishing encounter tables have been altered to roughly match the levels of the surrounding routes.
- Traded Pokemon ("Outsiders") can now be nicknamed at the Name Rater's House. - Traded Pokemon ("Outsiders") can now be nicknamed at the Name Rater's House.
- HP bar has been doubled in speed, having a 1 frame delay per pixel rather than 2. - HP bar has been doubled in speed, having a 1 frame delay per pixel rather than 2.
- The "You missed the Pokemon!" message now only plays in the Safari Zone, with regular encounters now stating "It's too strong!". This aims to make the message less misleading while staying true to the setting.
- The blinking animation when hit by moves like Tackle now repeats 4 instead of 6 times, speeding up battles by a bit while not sacrificing impact. - The blinking animation when hit by moves like Tackle now repeats 4 instead of 6 times, speeding up battles by a bit while not sacrificing impact.
- The Rock in the Safari Zone now only raises the flee chance by 1.5x, rather than 2x, opening up new strategies. - The Rock in the Safari Zone now only raises the flee chance by 1.5x, rather than 2x, opening up new strategies.
- PP symbol is displayed in the battle menu. PP displayed before, it just looks nicer now. Done by changing a straggler Japanese character. - PP symbol is displayed in the battle menu. PP displayed before, it just looks nicer now. Done by changing a straggler Japanese character.

View file

@ -1840,4 +1840,9 @@ _CandyJarCount::
line "@" line "@"
text_decimal wCandyJarCount, 1, 2 text_decimal wCandyJarCount, 1, 2
text "0" text "0"
prompt prompt
_MeltanIncrement::
text "<PLAYER> found"
line "10 MELTAN CANDY!"
prompt

View file

@ -11,6 +11,12 @@ _ItemUseBallText01::
line "#MON!" line "#MON!"
prompt prompt
_ItemUseBallText01_Alt::
text "It's too strong!"
line "It destroyed the"
cont "BALL!"
prompt
_ItemUseBallText02:: _ItemUseBallText02::
text "Darn! The #MON" text "Darn! The #MON"
line "broke free!" line "broke free!"
@ -18,7 +24,7 @@ _ItemUseBallText02::
_ItemUseBallText03:: _ItemUseBallText03::
text "Aww! It appeared" text "Aww! It appeared"
line "to be caught! " line "to be caught!"
prompt prompt
_ItemUseBallText04:: _ItemUseBallText04::

View file

@ -863,7 +863,7 @@ FaintEnemyPokemon:
ld a, $01 ld a, $01
ld [wDontSwitchOffMysteryBoxYet], a ld [wDontSwitchOffMysteryBoxYet], a
ld hl, MeltanIncrement ; Load text to show it's going up. ld hl, _MeltanIncrement ; Load text to show it's going up.
call PrintText ; Yep text. call PrintText ; Yep text.
call PrintEmptyString ; vs text likes this. call PrintEmptyString ; vs text likes this.
.skip .skip
@ -6220,11 +6220,17 @@ LoadEnemyMonData:
cp LINK_STATE_BATTLING cp LINK_STATE_BATTLING
jp z, LoadEnemyMonFromParty jp z, LoadEnemyMonFromParty
; Upon initiating a battle, check if the Mystery Box has been activated. ; Mystery Box functionality.
; First, we need to check if it's a trainer battle, or everyone will use Meltan.
ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
jr z, .skip ; If so, skip.
; Upon initiating a battle, if not a trainer battle, check if the Mystery Box has been activated.
; ~50% of the time, Meltan will replace what you encounter. ; ~50% of the time, Meltan will replace what you encounter.
ld a, [wMysteryBoxActive] ; Load the box. ld a, [wMysteryBoxActive] ; Load the box.
cp $01 ; Check if it's active. cp $01 ; Check if it's active.
jr nz, .cont ; If not, load a normal Pokemon. I know this looks sort of weird, it's just how it panned out. jr nz, .skip ; If not, load a normal Pokemon. I know this looks sort of weird, it's just how it panned out.
; This didn't work for some reason. It seems unnecessary, anyway... ; This didn't work for some reason. It seems unnecessary, anyway...
;call Random ;call Random
@ -6235,7 +6241,7 @@ LoadEnemyMonData:
ld a, MELTAN ; Meltan is loaded... ld a, MELTAN ; Meltan is loaded...
ld [wEnemyMonSpecies2], a ; Here! ld [wEnemyMonSpecies2], a ; Here!
.cont ; Standard loading. .skip ; Standard loading.
ld a, [wEnemyMonSpecies2] ld a, [wEnemyMonSpecies2]
ld [wEnemyMonSpecies], a ld [wEnemyMonSpecies], a
ld [wd0b5], a ld [wd0b5], a
@ -7201,8 +7207,3 @@ StupidBattleTentFix:
text "Oops! Better" text "Oops! Better"
line "luck next time!" line "luck next time!"
prompt prompt
MeltanIncrement:
text "<PLAYER> found"
line "10 MELTAN CANDY!"
prompt

View file

@ -164,6 +164,7 @@ DebugSetPokedexEntries:
ret ret
DebugItemsList: DebugItemsList:
db POKE_BALL, 99
db MYSTERY_BOX, 1 db MYSTERY_BOX, 1
db CANDY_JAR, 1 db CANDY_JAR, 1
db BICYCLE, 1 db BICYCLE, 1

View file

@ -497,9 +497,23 @@ ItemUseBall:
cp $10 cp $10
ld hl, ItemUseBallText00 ld hl, ItemUseBallText00
jp z, .printMessage jp z, .printMessage
cp $20
ld hl, ItemUseBallText01 ; The "ball miss" message has been reworked. I want to make it less misleading.
jp z, .printMessage ; Essentially, in normal battles, it'll say the Pokemon is too strong and broke the ball.
; In the Safari Zone, this mechanic happens a lot, so I'll keep the old text for that.
; This results in a convoluted series of statements, but I think I did a good job.
cp $20 ; First, let's load the usual ball anim check.
jr nz, .skip ; We're skipping from here early to make life easier for us.
ld hl, ItemUseBallText01 ; Load Safari Zone version (this is the old text)
ld a, [wBattleType] ; Alright, what are we actually working with here?
cp BATTLE_TYPE_SAFARI ; Safari Zone?
jp z, .printMessage ; Yep? Alright, ship the old text.
ld hl, ItemUseBallText01_Alt ; No? New one, then.
jp .printMessage ; Here ya go, pardner.
.skip
ld a, [wPokeBallAnimData] ; ok back to normal :3
cp $61 cp $61
ld hl, ItemUseBallText02 ld hl, ItemUseBallText02
jp z, .printMessage jp z, .printMessage
@ -647,6 +661,10 @@ ItemUseBallText01:
;"You missed the pokemon!" ;"You missed the pokemon!"
text_far _ItemUseBallText01 text_far _ItemUseBallText01
text_end text_end
ItemUseBallText01_Alt:
;"It's too strong!"
text_far _ItemUseBallText01_Alt
text_end
ItemUseBallText02: ItemUseBallText02:
;"Darn! The pokemon broke free!" ;"Darn! The pokemon broke free!"
text_far _ItemUseBallText02 text_far _ItemUseBallText02