drain.c
Break and Drain.
games/tbs/src/effect/parts/drain.c on GitHub
Break and Drain. Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunBreak
void BattleFx_RunBreak(struct BattleEffectArgument *effect)
Ice shards burst up from each target in turn, 20 frames apart, tinting the target as they go, and fall away below line 112.
Abilities: Break (kind 43).
Target n's 128 shards are PARTICLES n * 128 onwards, screen positions on the half-width canvas in 16.16; a shard's variant counts its frames and is -1 once it has gone. Loads the ice block palette into the first 64 colours of the background palette.
Used by gBattleFx_EffectHandlers.
BattleFx_RunDrain
void BattleFx_RunDrain(struct BattleEffectArgument *effect)
Drain: motes of light burst from each target in turn, 20 frames apart, and are pulled into the centre of the user's body.
Abilities: Drain, Psy Drain (kind 42).
Each target flashes in its damage pose for 42 frames as its motes burst, and the user glows from frame 40 until 20 frames before the end. Target n's motes are PARTICLES n * 128 onwards, battle positions in 16.16; only the first 32 of each 128 are moved and drawn. A negative variant marks a mote that has gone out.
effect: the targets; variant 0 takes the ice block palette, any other
the blast palette.Used by gBattleFx_EffectHandlers.
Macros, without a comment: DRAIN_ICE_SHARDS_PER_TARGET, DRAIN_MOTES_PER_TARGET, DRAIN_DRAWN.