summaryrefslogtreecommitdiff
path: root/engine/battle/effect_commands.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/effect_commands.asm')
-rw-r--r--engine/battle/effect_commands.asm17
1 files changed, 17 insertions, 0 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index d6f90d587..336d66e62 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -3432,7 +3432,24 @@ DoEnemyDamage:
ld [wBuffer4], a
sbc b
ld [wEnemyMonHP], a
+if DEF(_DEBUG)
+ push af
+ ld a, BANK(sSkipBattle)
+ call OpenSRAM
+ ld a, [sSkipBattle]
+ call CloseSRAM
+ or a
+ ; If [sSkipBattle] is nonzero, skip the "jr nc, .no_underflow" check,
+ ; so any attack deals maximum damage to the enemy.
+ jr nz, .debug_skip
+ pop af
+ jr nc, .no_underflow
+ push af
+.debug_skip
+ pop af
+else
jr nc, .no_underflow
+endc
ld a, [wBuffer4]
ld [hli], a