summaryrefslogtreecommitdiff
path: root/engine/battle/effect_commands.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-13 13:05:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-13 15:18:28 -0400
commite239aa4aba89156ac52b2af26d1bbf084ee88e75 (patch)
tree28e1dd069acc5c1a88662ce275f7102da68f3c4e /engine/battle/effect_commands.asm
parent4fb008844030283ad34cb0802b088b4dd7c9891c (diff)
Disassemble the final English debug ROM
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