Skip to content

Commit

Permalink
Restored Debug tool for battles
Browse files Browse the repository at this point in the history
  • Loading branch information
SoupPotato committed Dec 27, 2023
1 parent 0775e0c commit 0a08119
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions engine/battle/effect_commands.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a08119

Please sign in to comment.