2018-06-24 14:09:41 +00:00
|
|
|
BattleCommand_BellyDrum:
|
2022-07-09 21:12:02 +00:00
|
|
|
; BUG: Belly Drum sharply boosts Attack even with under 50% HP (see docs/bugs_and_glitches.md)
|
2018-01-26 16:36:00 +00:00
|
|
|
call BattleCommand_AttackUp2
|
2018-02-03 23:21:53 +00:00
|
|
|
ld a, [wAttackMissed]
|
2018-01-26 16:36:00 +00: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 15:13:06 +00:00
|
|
|
ld a, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1
|
2018-01-26 16:36:00 +00:00
|
|
|
|
|
|
|
.max_attack_loop
|
|
|
|
push af
|
|
|
|
call BattleCommand_AttackUp2
|
|
|
|
pop af
|
|
|
|
dec a
|
|
|
|
jr nz, .max_attack_loop
|
|
|
|
|
|
|
|
ld hl, BellyDrumText
|
2019-04-08 12:15:10 +00:00
|
|
|
jp StdBattleTextbox
|
2018-01-26 16:36:00 +00:00
|
|
|
|
|
|
|
.failed
|
|
|
|
call AnimateFailedMove
|
|
|
|
jp PrintButItFailed
|