diff --git a/README.md b/README.md index 2733fbe1..978aeb39 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 83fbbe24..0017cd60 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -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 diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm index d63218de..02ca2886 100644 --- a/engine/debug/debug_menu.asm +++ b/engine/debug/debug_menu.asm @@ -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 diff --git a/ram/wram.asm b/ram/wram.asm index 550e1af2..e9d1dd97 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -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