From e239aa4aba89156ac52b2af26d1bbf084ee88e75 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 13 Jul 2020 13:05:05 -0400 Subject: Disassemble the final English debug ROM --- engine/battle/effect_commands.asm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engine/battle') 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 -- cgit v1.2.3