2018-06-24 07:09:41 -07:00
|
|
|
BattleCommand_BellyDrum:
|
2018-01-26 08:36:00 -08:00
|
|
|
; 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
|
2018-02-03 15:21:53 -08:00
|
|
|
ld a, [wAttackMissed]
|
2018-01-26 08:36:00 -08:00
|
|
|
and a
|
|
|
|
jr nz, .failed
|
|
|
|
|
|
|
|
callfar GetHalfMaxHP
|
|
|
|
callfar CheckUserHasEnoughHP
|
|
|
|
jr nc, .failed
|
|
|
|
|
|
|
|
push bc
|
|
|
|
call AnimateCurrentMove
|
|
|
|
pop bc
|
|
|
|
callfar SubtractHPFromUser
|
|
|
|
call UpdateUserInParty
|
2020-11-03 07:13:06 -08:00
|
|
|
ld a, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1
|
2018-01-26 08:36:00 -08:00
|
|
|
|
|
|
|
.max_attack_loop
|
|
|
|
push af
|
|
|
|
call BattleCommand_AttackUp2
|
|
|
|
pop af
|
|
|
|
dec a
|
|
|
|
jr nz, .max_attack_loop
|
|
|
|
|
|
|
|
ld hl, BellyDrumText
|
2019-04-08 05:15:10 -07:00
|
|
|
jp StdBattleTextbox
|
2018-01-26 08:36:00 -08:00
|
|
|
|
|
|
|
.failed
|
|
|
|
call AnimateFailedMove
|
|
|
|
jp PrintButItFailed
|