Defined in macros/scripts/battle_anims.asm and engine/battle_anims/anim_commands.asm:BattleAnimCommands.
$00−$CF: anim_wait length$D0: anim_obj object, x, y, paramAlternate: anim_obj object, x_tile, x, y_tile, y, param
Spawns an object at coordinate (x, y).
ANIM_OBJ constants (see constants/battle_anim_constants.asm)The y position also depends on the y offset defined by the object.
$D1: anim_1gfx gfx$D2: anim_2gfx gfx1, gfx2$D3: anim_3gfx gfx1, gfx2, gfx3$D4: anim_4gfx gfx1, gfx2, gfx3, gfx4$D5: anim_5gfx gfx1, gfx2, gfx3, gfx4, gfx5Loads 1-5 sets of graphics. Will overwrite any previously loaded sets.
ANIM_GFX constants (see constants/battle_anim_constants.asm)Caveats:
$D6: anim_incobj object_idIncrements an object's state.
Objects are state machines. anim_incobj progresses the state of an object.
$D7: anim_setobj object_id, stateSets an object's state to a specific value.
Objects are state machines. anim_setobj changes the state of an object.
$D8: anim_incbgeffect bg_effectIncrements a bg effect's state.
ANIM_BG constants (see constants/battle_anim_constants.asm)Since there can't be two of the same bg effect, the effect type is used. This is distinct from anim_incobj.
$D9: anim_battlergfx_2row$DA: anim_battlergfx_1rowLoads animation graphics for the bottom one or two rows of the enemy pokemon and the top one or two rows of the player's.
These graphics are identified through BATTLE_ANIM_GFX_ENEMYFEET and BATTLE_ANIM_GFX_PLAYERHEAD.
Caveats:
anim_4gfx and anim_5gfx.$DB: anim_checkpokeballSets BattleAnimVar to the result of GetPokeBallWobble.
$DC: anim_transform$DD: anim_raisesub$DE: anim_dropsub$DF: anim_resetobp0Resets rOBP0 to the default (q0123 or %00011011).
$E0: anim_sound duration, tracks, sound_idPlays a sound.
$E1: anim_cry pitchPlays the user's cry.
$E2: anim_minimizeopp$E3: anim_oamon$E4: anim_oamoff$E5: anim_clearobjsRemoves all active objects.
$E6: anim_beatup$E7: anim_0xe7Does nothing. Unused.
$E8: anim_updateactorpic$E9: anim_minimize$EA: anim_0xeaDoes nothing. Unused.
$EB: anim_0xebDoes nothing. Unused.
$EC: anim_0xecDoes nothing. Unused.
$ED: anim_0xedDoes nothing. Unused.
$EE: anim_if_param_and value, address$EF: anim_jumpuntil addressJumps to another script and decrements param until it reaches 0. Similar to anim_loop.
$F0: anim_bgeffect bg_effect, unknown1, unknown2, unknown3ANIM_BG constants (see constants/battle_anim_constants.asm)$F1: anim_bgp colorsSets rBGP to colors.
$F2: anim_obp0 colorsSets rOBP0 to colors.
$F3: anim_obp1 colorsSets rOBP1 to colors.
$F4: anim_keepspritesCauses only the palettes to be cleared from the OAM memory when the animation ends, instead of clearing all of the OAM memory. This causes all objects to start using palette 0 (monochrome) when the animation script ends, and whatever objects were on the screen before the last anim_ret will stay on the screen.
This is only used for the Poke Ball animation.
$F5: anim_0xf5Does nothing. Unused.
$F6: anim_0xf6Does nothing. Unused.
$F7: anim_0xf7Does nothing. Unused.
$F8: anim_if_param_equal value, addressJumps to another script if wBattleAnimParam is equal to value.
$F9: anim_setvar valueSets BattleAnimVar to value.
$FA: anim_incvarIncrements BattleAnimVar by 1.
$FB: anim_if_var_equal value, addressJumps to another script if BattleAnimVar is equal to value.
$FC: anim_jump addressJumps to another script.
$FD: anim_loop count, addressJumps to another script up to count times. Then does nothing, allowing execution to continue.
$FE: anim_call addressCalls a script.
There is no call stack. The return address is overwritten, so the maximum call depth is 1.
$FF: anim_retEnds the script and returns to where it was called from. If there was no caller, the animation ends.