mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12: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
|
@ -124,6 +124,7 @@ QoL Enhancements
|
|||
- 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.
|
||||
- PP symbol is displayed in the battle menu. PP displayed before, it just looks nicer now. Done by changing a straggler Japanese character.
|
||||
- When dealing 0 damage, there'll now be a special text box, making it less misleading.
|
||||
- Lorelei, Bruno, and Agatha now play the Gym Leader Battle theme.
|
||||
- Trainer DVs are perfect-15s.
|
||||
- The protagonist is referred to in a gender neutral manner.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -91,21 +91,27 @@ TestBattle:
|
|||
dec a
|
||||
ld [hl], a
|
||||
|
||||
; Give the player a
|
||||
; level 20 Rhydon.
|
||||
ld a, EEVEE
|
||||
; Player's Pokemon.
|
||||
ld a, NIDOREIGN
|
||||
ld [wcf91], a
|
||||
ld a, 10
|
||||
ld a, 100
|
||||
ld [wCurEnemyLVL], a
|
||||
xor a
|
||||
ld [wMonDataLocation], a
|
||||
ld [wCurMap], a
|
||||
call AddPartyMon
|
||||
|
||||
; Fight against a
|
||||
; level 20 Rhydon.
|
||||
ld a, CROAKOZUNA
|
||||
|
||||
; This function gives you a way to waste a turn, never know when you'll need it.
|
||||
; Alternatively, add a move to test.
|
||||
ld hl, wPartyMon1Moves
|
||||
ld a, SPLASH
|
||||
ld [hli], a
|
||||
|
||||
; Opponent's Pokemon.
|
||||
ld a, WEEDLE
|
||||
ld [wCurOpponent], a
|
||||
ld a, 100 ; Set the level you want here.
|
||||
ld [wCurEnemyLVL], a
|
||||
|
||||
predef InitOpponent
|
||||
|
||||
|
|
|
@ -2201,7 +2201,12 @@ wWhichDungeonWarp:: db
|
|||
; bit 7: set by ItemUseCardKey, which is leftover code from a previous implementation of the Card Key
|
||||
wd728:: db
|
||||
|
||||
ds 1
|
||||
; This is a new bit for cases where zero damage is dealt.
|
||||
; Usually, it's defined as a miss, but it's a bit misleading.
|
||||
; To give players a feel of power, I've added new text for it.
|
||||
; $00 - False
|
||||
; $01 - True
|
||||
wDidZeroDamage:: db
|
||||
|
||||
; redundant because it matches wObtainedBadges
|
||||
; used to determine whether to show name on statue and in two NPC text scripts
|
||||
|
|
Loading…
Reference in a new issue