From 0a08119691facc9223d9dc338a59acab6bd40172 Mon Sep 17 00:00:00 2001 From: SoupPotato Date: Wed, 27 Dec 2023 00:23:20 +0000 Subject: [PATCH] Restored Debug tool for battles --- engine/battle/effect_commands.asm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 8fb719339..912b90236 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -3441,7 +3441,25 @@ DoEnemyDamage: ld [wHPBuffer2 + 1], a sbc b ld [wEnemyMonHP], a +; debug tool to allow quick KO of all opponents. Uncomment to activate for debug rom +;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, [wHPBuffer2 + 1] ld [hli], a