You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Move-unique effect commands consistently go in engine/battle/move_effects/
This commit is contained in:
36
engine/battle/move_effects/belly_drum.asm
Normal file
36
engine/battle/move_effects/belly_drum.asm
Normal file
@@ -0,0 +1,36 @@
|
||||
BattleCommand_BellyDrum: ; 37c1a
|
||||
; 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, [AttackMissed]
|
||||
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
|
||||
|
||||
; 37c55
|
||||
Reference in New Issue
Block a user