1/256 Text and other transparency enhancements

- In the event of a 1/256 miss, the game will now state the Pokemon evaded the attack to signify its occurrence. This is part of an effort to make misses, overall, more transparent.
- Battle Debug now loads some items to assist with testing.
- Misleading Guard Spec message in Celadon has been changed to refer to X Special, which it was actually describing.
- Removed "it can spook the target sometimes" text when getting the TM for Rock Slide, because it's a LIE
This commit is contained in:
Llinos Evans 2023-06-12 14:41:13 +01:00
parent 62059aafd5
commit 7ed5c0ae95
7 changed files with 89 additions and 16 deletions

View file

@ -3955,11 +3955,24 @@ PrintMoveFailureText:
; This gives players a nice little dopamine rush.
ld a, [wDidZeroDamage] ; Grab the variable.
cp 1 ; Alright, is it set?
jr nz, .skip ; No? Skip these instructions.
jr nz, .check256 ; No? Skip these instructions, but don't forget the 1/256 check.
ld hl, ZeroDamageText ; Load the zero damage text in.
ld a, 0 ; Now shut the address off.
ld [wDidZeroDamage], a ; Bink!
; 1/256 text functionality.
; This makes them a feature, with the reasoning being vanilla experience + how it may have been intentional all along.
; See Pokemon Stadium's handling of the mechanic for latter point.
; Yes I am a fucking psycho
; In theory this could be merged with the previous check in some capacity but that's neither here nor there
.check256 ; jump point
ld a, [wAttackWasDodged] ; Alright, let's see...
cp 1 ; Was the attack dodged?
jr nz, .skip ; No? Ok, neither of my hardmods are needed. proceed as normal.
ld hl, EvadedAttackText ; Oho? Let's load this then.
ld a, 0 ; Now to shut off the variable.
ld [wAttackWasDodged], a ; Bink!
.skip
ld a, [wCriticalHitOrOHKO]
cp $ff
@ -4016,6 +4029,10 @@ ZeroDamageText:
prompt
text_end
EvadedAttackText: ; for 1/256, repurposed from leech seed
text_far _EvadedAttackText
text_end
KeptGoingAndCrashedText:
text_far _KeptGoingAndCrashedText
text_end
@ -5570,9 +5587,15 @@ MoveHitTest:
; if the random number generated is greater than or equal to the scaled accuracy, the move misses
; note that this means that even the highest accuracy is still just a 255/256 chance, not 100%
call BattleRandom
cp 255 ; is it 1/256?
jr z, .oneIn256 ; if true, skip the next few lines.
cp b
jr nc, .moveMissed
ret
.oneIn256 ; 1/256 text functionality, used to be more transparent to players.
ld a, 1
ld [wAttackWasDodged], a
;fallthrough
.moveMissed
xor a
ld hl, wDamage ; zero the damage

View file

@ -28,13 +28,14 @@ LeechSeedEffect_:
.moveMissed
ld c, 50
call DelayFrames
ld hl, EvadedAttackText
ld hl, LeechFailedText
jp PrintText
WasSeededText:
text_far _WasSeededText
text_end
EvadedAttackText:
text_far _EvadedAttackText
; This messed up if I farcalled AttackMissedText, so we're doing this instead.
LeechFailedText:
text_far _ButItFailedText
text_end