Alchemy

burst_shower.c

The blessings' burst showers.

games/tbs/src/effect/parts/burst_shower.c on GitHub

The blessings' burst showers. Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_ArmBg2AffineHBlankDma

void BattleFx_ArmBg2AffineHBlankDma(void)

Arms DMA 0 to copy one word of gBattleFxWork's bg2xLines table into BG2X at each horizontal blank, bending BG2 line by line.

Runs each frame as a scheduler callback added by the target motes, the casting impacts, Condemn, the gathering lights, Torch and Planet Diver, each of which removes it before it returns. Stops DMA 0 and restarts it from the top of the table.

Used by BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunGatheringLights, BattleFx_RunHaunt, BattleFx_RunOrbitingSpirals, BattleFx_RunTargetMotes, BattleFx_RunTorch.

Line 31

BattleFx_RunFireBlessing

void BattleFx_RunFireBlessing(struct BattleEffectArgument *effect)

The user fires a stream of flash bursts at the targets, one a frame, each towards a random point near a target.

Abilities: Fire Blessing (kind 400).

Used by gBattleFx_EffectHandlers.

Line 43

BattleFx_RunWaterBlessing

void BattleFx_RunWaterBlessing(struct BattleEffectArgument *effect)

The user fires a stream of bursts at the targets in the water-spray palette.

Abilities: Water Blessing (kind 401).

Used by gBattleFx_EffectHandlers.

Line 49

BattleFx_RunDarkBlessing

void BattleFx_RunDarkBlessing(struct BattleEffectArgument *effect)

The user fires a stream of grey bursts at the targets, which turn solid black and stay so.

Abilities: Dark Blessing (kind 403).

Used by gBattleFx_EffectHandlers.

Line 56

BattleFx_RunAcidBlessing

void BattleFx_RunAcidBlessing(struct BattleEffectArgument *effect)

Fires pink bursts from 16 pixels below the normal origin.

Abilities: Dark Blessing, Acid Blessing (kind 404).

Used by gBattleFx_EffectHandlers.

Line 62

BattleFx_RunStormBlessing

void BattleFx_RunStormBlessing(struct BattleEffectArgument *effect)

Shows violet lightning between the user and targets instead of bursts: a bolt flickers through three pictures in front of the user, and the targets flash in turn without being knocked back.

Abilities: Storm Blessing (kind 405).

Used by gBattleFx_EffectHandlers.

Line 70

BattleFx_RunEvilBlessing

void BattleFx_RunEvilBlessing(struct BattleEffectArgument *effect)

The user fires a stream of demon faces at the targets, from 16 pixels in front of it.

Abilities: Evil Blessing (kind 406).

Used by gBattleFx_EffectHandlers.

Line 77

BattleFx_RunDeadlyGas

void BattleFx_RunDeadlyGas(struct BattleEffectArgument *effect)

The user fires a stream of Mars-coloured bursts at the targets, from 28 pixels in front of it.

Abilities: Deadly Gas (kind 407).

Used by gBattleFx_EffectHandlers.

Line 84

BattleFx_RunBurstShower

void BattleFx_RunBurstShower(struct BattleEffectArgument *effect, s32 mode)

Burst shower: for 48 frames the user fires one burst a frame at a random point near one of the targets, taking them in turn, and each target is hit every 8 frames. Each burst lives 24 frames. A sound plays on frame 4 and the battle shows the damage on frame 24 (frame 60 in the grey mode).

Called by the seven blessing wrappers above. Each burst is one of work->particles, its variant counting the frames it has lived (-1 when free). Writes REG_BLDALPHA, the first 64 BG colours (all but modes 5 and 7), REG_BLDCNT in the grey mode and REG_BG2PA in the lightning mode; sets work->shakeFrames on each hit. Ends with the transfer callback removed, the blitters freed and the canvas layer closed.

effect: the user and the targets.
mode: the burst and its palette: 0 flash bursts, 1 in the ice block
      palette, 2 in the water spray palette, 3 pink and fired from 16
      pixels lower, 4 in the Mars djinni palette from 28 pixels in
      front, 6 grey (the targets turn solid black and stay so), 7 demon
      faces from 16 pixels in front. Mode 5 fires no bursts: a violet
      lightning bolt stands between the user and the targets, on a
      canvas shown at three times its width. No kind in the effect
      table uses mode 1.

Used by BattleFx_RunAcidBlessing, BattleFx_RunDarkBlessing, BattleFx_RunDeadlyGas, BattleFx_RunEvilBlessing, BattleFx_RunFireBlessing, BattleFx_RunStormBlessing, BattleFx_RunWaterBlessing.

Line 110

Enumerations

BurstShowerMode

enum BurstShowerMode

The burst shower's styles, its mode argument.

Value=
BURST_SHOWER_MODE_FLASHflash bursts
BURST_SHOWER_MODE_ICEin the ice block palette
BURST_SHOWER_MODE_SPRAYin the water spray palette
BURST_SHOWER_MODE_PINKpink, fired from 16 pixels lower
BURST_SHOWER_MODE_DJINNIMars djinni palette, 28 pixels in front
BURST_SHOWER_MODE_LIGHTNINGno bursts: a violet lightning bolt
BURST_SHOWER_MODE_GREYgrey; the targets stay solid black
BURST_SHOWER_MODE_FACESdemon faces from 16 pixels in front

Line 13

Macros, without a comment: BURST_SHOWER_CELLS, BURST_SHOWER_BURSTS, BURST_SHOWER_BURST_LIFE, BURST_SHOWER_FRAMES.

On this page