Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_plasma.c

Plasma, and the spark groups of Blast and Dynamite. More…

Included by battle_effect.c.

Macros

NameDescription
#definePLASMA_SPARK_COUNT PARTICLE_POOL_COUNTThe lightning pillars throw their sparks into one pool in PARTICLES, as Volcano's fire pillars do.
#definePLASMA_GROUND_Y 104The ground the sparks fly up from and bounce off.
#definePLASMA_SPACING 8ticks between pillars
#definePLASMA_SECOND_PICTURE PICTURE_BYTES(LIGHTNING_PILLAR)The second picture in the sprite sheet, after the first 48x112 one.
#definePLASMA_FLASH_LEVEL 16The canvas level a strike floods the whole canvas with: the flash that tints the battle as each pillar comes down.
#definePLASMA_COLUMN_X (side, pillar) PlasmaColumns[(pillar) + (side) * 7]PlasmaColumns has seven pillars for each side.
#definePLASMA_SPARKS 0Each Plasma variant's pair in PlasmaSparks: the sparks per pillar and the ticks of shake.
#definePLASMA_SHAKE_TICKS 1ticks the screen shakes at each strike
#defineSPARK_GROUPS_SPARKS 0Each spark group variant's row of SparkGroupsShapes: sparks per burst, bursts, and from SPARK_GROUPS_OFFSET each burst's offset across.
#defineSPARK_GROUPS_BURSTS 1bursts, SPARK_GROUPS_SPACING ticks apart
#defineSPARK_GROUPS_OFFSET 2burst i's offset across, at [2 + i]
#defineSPARK_GROUPS_FLASHES 16flashes kept per burst
#defineSPARK_GROUPS_SPACING 8ticks between bursts
#defineSPARK_GROUPS_RING 12of which drawn as the ring
#defineSPARK_GROUPS_FLASH_DRAWN 18a flash is drawn over its final 18 ticks
#defineSPARK_GROUPS_FLASH_LIFE
#defineSPARK_GROUPS_GROUND_Y 108the ground the sparks bounce off
#defineSPARK_GROUPS_CENTRE_SHIFT 28Burst i is centred at the origin plus its offset less this, across the screen; when the party casts, at the origin less its offset plus this.

Functions

NameDescription
voidbtEffectRunPlasma (BATTLE_EFFECT_PARM *args)Pillars of lightning strike one after another, each with a flash, throwing sparks up from the ground and knocking the targets back.
voidbtEffectRunNova (BATTLE_EFFECT_PARM *args)Bursts go off behind the battle's first layer.
voidbtEffectRunDynamite (BATTLE_EFFECT_PARM *args)Orange bursts go off in front of the battle, which darkens behind them.
voidbtEffectRunSparkGroups (BATTLE_EFFECT_PARM *args, Sint32 mode)One to three bursts go off: each flashes, rings itself with smaller flashes that fade, and throws out sparks that bounce on the ground, knocking the targets back.

Description

Plasma, and the spark groups of Blast and Dynamite. Part of battle_effect.c.

Macros in detail

PLASMA_SPARK_COUNT

#define PLASMA_SPARK_COUNT PARTICLE_POOL_COUNT

The lightning pillars throw their sparks into one pool in PARTICLES, as Volcano's fire pillars do.

Referenced by btEffectRunPlasma().

Definition at line 5 of file battle_effect_plasma.c.

PLASMA_GROUND_Y

#define PLASMA_GROUND_Y 104

The ground the sparks fly up from and bounce off.

Referenced by btEffectRunPlasma().

Definition at line 7 of file battle_effect_plasma.c.

PLASMA_SPACING

#define PLASMA_SPACING 8

ticks between pillars

Referenced by btEffectRunPlasma().

Definition at line 9 of file battle_effect_plasma.c.

PLASMA_SECOND_PICTURE

#define PLASMA_SECOND_PICTURE PICTURE_BYTES(LIGHTNING_PILLAR)

The second picture in the sprite sheet, after the first 48x112 one.

Referenced by btEffectRunPlasma().

Definition at line 11 of file battle_effect_plasma.c.

PLASMA_FLASH_LEVEL

#define PLASMA_FLASH_LEVEL 16

The canvas level a strike floods the whole canvas with: the flash that tints the battle as each pillar comes down.

Referenced by btEffectRunPlasma().

Definition at line 14 of file battle_effect_plasma.c.

PLASMA_COLUMN_X

#define PLASMA_COLUMN_X(side, pillar) PlasmaColumns[(pillar) + (side) * 7]

PlasmaColumns has seven pillars for each side.

Referenced by btEffectRunPlasma().

Definition at line 17 of file battle_effect_plasma.c.

PLASMA_SPARKS

#define PLASMA_SPARKS 0

Each Plasma variant's pair in PlasmaSparks: the sparks per pillar and the ticks of shake.

sparks each lightning pillar throws

Referenced by btEffectRunPlasma().

Definition at line 21 of file battle_effect_plasma.c.

PLASMA_SHAKE_TICKS

#define PLASMA_SHAKE_TICKS 1

ticks the screen shakes at each strike

Referenced by btEffectRunPlasma().

Definition at line 22 of file battle_effect_plasma.c.

SPARK_GROUPS_SPARKS

#define SPARK_GROUPS_SPARKS 0

Each spark group variant's row of SparkGroupsShapes: sparks per burst, bursts, and from SPARK_GROUPS_OFFSET each burst's offset across.

sparks each burst throws

Referenced by btEffectRunSparkGroups().

Definition at line 220 of file battle_effect_plasma.c.

SPARK_GROUPS_BURSTS

#define SPARK_GROUPS_BURSTS 1

bursts, SPARK_GROUPS_SPACING ticks apart

Referenced by btEffectRunSparkGroups().

Definition at line 221 of file battle_effect_plasma.c.

SPARK_GROUPS_OFFSET

#define SPARK_GROUPS_OFFSET 2

burst i's offset across, at [2 + i]

Referenced by btEffectRunSparkGroups().

Definition at line 222 of file battle_effect_plasma.c.

SPARK_GROUPS_FLASHES

#define SPARK_GROUPS_FLASHES 16

flashes kept per burst

Referenced by btEffectRunSparkGroups().

Definition at line 224 of file battle_effect_plasma.c.

SPARK_GROUPS_SPACING

#define SPARK_GROUPS_SPACING 8

ticks between bursts

Referenced by btEffectRunSparkGroups().

Definition at line 225 of file battle_effect_plasma.c.

SPARK_GROUPS_RING

#define SPARK_GROUPS_RING 12

of which drawn as the ring

Referenced by btEffectRunSparkGroups().

Definition at line 226 of file battle_effect_plasma.c.

SPARK_GROUPS_FLASH_DRAWN

#define SPARK_GROUPS_FLASH_DRAWN 18

a flash is drawn over its final 18 ticks

Referenced by btEffectRunSparkGroups().

Definition at line 227 of file battle_effect_plasma.c.

SPARK_GROUPS_FLASH_LIFE

#define SPARK_GROUPS_FLASH_LIFE

Referenced by btEffectRunSparkGroups().

Definition at line 228 of file battle_effect_plasma.c.

SPARK_GROUPS_GROUND_Y

#define SPARK_GROUPS_GROUND_Y 108

the ground the sparks bounce off

Referenced by btEffectRunSparkGroups().

Definition at line 231 of file battle_effect_plasma.c.

SPARK_GROUPS_CENTRE_SHIFT

#define SPARK_GROUPS_CENTRE_SHIFT 28

Burst i is centred at the origin plus its offset less this, across the screen; when the party casts, at the origin less its offset plus this.

Referenced by btEffectRunSparkGroups().

Definition at line 235 of file battle_effect_plasma.c.

Functions in detail

btEffectRunPlasma

void btEffectRunPlasma(BATTLE_EFFECT_PARM *args)

Pillars of lightning strike one after another, each with a flash, throwing sparks up from the ground and knocking the targets back.

Abilities: Plasma, Shine Plasma, Spark Plasma, Thunderclap, Thunderbolt, Thunderhead.

References btCameraShake(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), PlasmaCounts, PlasmaSparks, Sint32, syCos(), syRandom(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 29 of file battle_effect_plasma.c.

btEffectRunNova

void btEffectRunNova(BATTLE_EFFECT_PARM *args)

Bursts go off behind the battle's first layer.

Abilities: Blast, Nova, Supernova, Fire Bomb, Cluster Bomb, Carpet Bomb.

References btEffectRunSparkGroups().

Referenced by BattleEffectHandlers.

Definition at line 205 of file battle_effect_plasma.c.

btEffectRunDynamite

void btEffectRunDynamite(BATTLE_EFFECT_PARM *args)

Orange bursts go off in front of the battle, which darkens behind them.

Abilities: Dynamite, Angry Mine.

References btEffectRunSparkGroups().

Referenced by BattleEffectHandlers.

Definition at line 213 of file battle_effect_plasma.c.

btEffectRunSparkGroups

void btEffectRunSparkGroups(BATTLE_EFFECT_PARM *args, Sint32 mode)

One to three bursts go off: each flashes, rings itself with smaller flashes that fade, and throws out sparks that bounce on the ground, knocking the targets back.

References btCameraShake(), btEffectBuildCanvasBlitters(), btEffectPosProjectScaledBattler(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), PlasmaFlashPictures, Sint32, SparkGroupsShapes, syCos(), syRandom(), sySin() and sySoundPlayStub().

Referenced by btEffectRunCastingImpact(), btEffectRunDynamite(), btEffectRunMightyPress(), btEffectRunNova(), btEffectRunSevereBlow() and btEffectRunThrash().

Definition at line 240 of file battle_effect_plasma.c.