mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
ef9b9bb437
Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
32 lines
599 B
NASM
32 lines
599 B
NASM
BattleCommand_BellyDrum:
|
|
; BUG: Belly Drum sharply boosts Attack even with under 50% HP (see docs/bugs_and_glitches.md)
|
|
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, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1
|
|
|
|
.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
|