gathering_lights.c
Demon Night, Rumble and Haunting.
games/tbs/src/effect/parts/gathering_lights.c on GitHub
Demon Night, Rumble and Haunting. Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunDemonNight
void BattleFx_RunDemonNight(struct BattleEffectArgument *effect)
Sixteen pink lights burst out of the user and are pulled into each target, with the heavy impact sound.
Abilities: Demon Night (kind 50).
Used by gBattleFx_EffectHandlers.
BattleFx_RunRumble
void BattleFx_RunRumble(struct BattleEffectArgument *effect)
Eight lights in Mars Djinn colours burst out of the user and are pulled into each target.
Abilities: Rumble (kind 308).
Used by gBattleFx_EffectHandlers.
BattleFx_RunHaunting
void BattleFx_RunHaunting(struct BattleEffectArgument *effect)
Twelve lights in Mercury Djinn colours burst out of the user and are pulled into each target.
Abilities: Haunting (kind 351).
Used by gBattleFx_EffectHandlers.
BattleFx_RunGatheringLights
void BattleFx_RunGatheringLights(struct BattleEffectArgument *effect, s32 mode)
For each target in turn, 20 frames apart, lights burst out of the user, one every 2 frames; from 30 frames into the turn, one more each frame is pulled towards the middle of the target's body, and goes out when it is within 32 pixels across and in depth. Each light takes one of three images. Each target is struck 70 frames after its turn starts, and the battle shows the damage at frame 80. The effect layer ripples throughout.
Called by BattleFx_RunDemonNight, BattleFx_RunRumble and BattleFx_RunHaunting. Loads its colours over the first 64 of the background palette, uses PARTICLES 0 to 1023, writes work->bg2xLines each frame and adds BattleFx_ArmBg2AffineHBlankDma to feed it to BG2X; removes both its callbacks before it returns.
mode : the colours (0 pink, 1 Mars Djinn, 2 Mercury Djinn) and the row of
gGatheringLights_Counts: lights per target and frames.Used by BattleFx_RunDemonNight, BattleFx_RunHaunting, BattleFx_RunRumble.
Macros, without a comment: GATHERING_LIGHTS_SLOTS.