mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-20 22:28:41 +13:00
Zero damage text
In RBY, there are extremely minor situations where zero damage can be dealt. These usually involve quad resists and profound level differences. To quote the disassembly: ; this only occurs if a move that would do 2 or 3 damage is 0.25x effective against the target However, Psywave is also capable of this. Thus, a new case has been added for when this occurs, which is triggered through a new WRAM entry. Easiest way to do it without having to restructure how misses are handled. This is overall minor, but it'll probably make at least one person laugh, and that's all I need.
This commit is contained in:
parent
14c92ac855
commit
d0b7d56e5e
4 changed files with 39 additions and 9 deletions
|
|
@ -3949,6 +3949,17 @@ PrintMoveFailureText:
|
|||
and $7f
|
||||
jr z, .gotTextToPrint
|
||||
ld hl, AttackMissedText
|
||||
|
||||
; New text for when moves deal zero damage.
|
||||
; 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.
|
||||
ld hl, ZeroDamageText ; Load the zero damage text in.
|
||||
ld a, 0 ; Now shut the address off.
|
||||
ld [wDidZeroDamage], a ; Bink!
|
||||
|
||||
.skip
|
||||
ld a, [wCriticalHitOrOHKO]
|
||||
cp $ff
|
||||
jr nz, .gotTextToPrint
|
||||
|
|
@ -3998,6 +4009,12 @@ AttackMissedText:
|
|||
text_far _AttackMissedText
|
||||
text_end
|
||||
|
||||
ZeroDamageText:
|
||||
text "It didn't leave"
|
||||
line "a scratch!"
|
||||
prompt
|
||||
text_end
|
||||
|
||||
KeptGoingAndCrashedText:
|
||||
text_far _KeptGoingAndCrashedText
|
||||
text_end
|
||||
|
|
@ -5403,6 +5420,7 @@ AdjustDamageForMoveType:
|
|||
; this only occurs if a move that would do 2 or 3 damage is 0.25x effective against the target
|
||||
inc a
|
||||
ld [wMoveMissed], a
|
||||
ld [wDidZeroDamage], a
|
||||
.skipTypeImmunity
|
||||
pop bc
|
||||
pop hl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue