mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
35 lines
643 B
NASM
35 lines
643 B
NASM
BattleCommand_BellyDrum:
|
|
; bellydrum
|
|
; This command is buggy because it raises the user's attack
|
|
; before checking that it has enough HP to use the move.
|
|
; Swap the order of these two blocks to fix.
|
|
call BattleCommand_AttackUp2
|
|
ld a, [wAttackMissed]
|
|
and a
|
|
jr nz, .failed
|
|
|
|
callfar GetHalfMaxHP
|
|
callfar CheckUserHasEnoughHP
|
|
jr nc, .failed
|
|
|
|
push bc
|
|
call AnimateCurrentMove
|
|
pop bc
|
|
callfar SubtractHPFromUser
|
|
call UpdateUserInParty
|
|
ld a, 5
|
|
|
|
.max_attack_loop
|
|
push af
|
|
call BattleCommand_AttackUp2
|
|
pop af
|
|
dec a
|
|
jr nz, .max_attack_loop
|
|
|
|
ld hl, BellyDrumText
|
|
jp StdBattleTextBox
|
|
|
|
.failed
|
|
call AnimateFailedMove
|
|
jp PrintButItFailed
|