Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_drain.c

Break and Drain. More…

Included by battle_effect.c.

Macros

NameDescription
#defineDRAIN_TARGET_TICKS 20Break and Drain take the targets in turn, this many ticks apart.
#defineBREAK_SHARDS_PER_TARGET 128
#defineBREAK_FALL_TICKS 56Break runs DRAIN_TARGET_TICKS a target and then this many while the last shards fall.
#defineBREAK_HIT_TICK 32
#defineBREAK_SHARD_GROUND 112The canvas row below which a falling shard goes out.
#defineDRAIN_MOTES_PER_TARGET 128
#defineDRAIN_DRAWN 32motes drawn for each target
#defineDRAIN_END_TICKS 72Drain runs DRAIN_TARGET_TICKS a target and then this many; the user glows from DRAIN_GLOW_TICK until DRAIN_GLOW_END_TICKS before the end.
#defineDRAIN_GLOW_TICK 40
#defineDRAIN_GLOW_END_TICKS 20
#defineDRAIN_HIT_TICK 64
#defineDRAIN_PULL_DELAY 10A mote homes in on the user this many ticks after its target's turn, each mote a tick after the one before, gaining a 256th of the distance a tick.
#defineDRAIN_PULL (distance) ((distance) >> 8)
#defineDRAIN_ARRIVAL_DISTANCE 16A mote goes out within this many pixels of the middle of the user, across and in depth.
#defineTRUE_COLLIDE_VIOLET 21The red and blue of True Collide's first colour, a dim violet.

Enumerations

NameDescription
enumDRAIN_MOTES_MODE { DRAIN_MOTES_DRAIN, DRAIN_MOTES_PSY_DRAIN, DRAIN_MOTES_TRUE_C … }What btEffectRunDrainMotes draws, each named for the ability that plays it.

Functions

NameDescription
voidbtEffectRunBreak (BATTLE_EFFECT_PARM *args)Ice shards burst up from each target in turn, tinting it, and fall away.
voidbtEffectRunDrain (BATTLE_EFFECT_PARM *args)Motes of light burst from each target in turn, and are pulled into the centre of the user's body: white for the basic variant, golden for the stronger.
voidbtEffectRunTrueCollide (BATTLE_EFFECT_PARM *args)Large violet orbs burst from each target in turn, and are pulled into the centre of the user's body.
voidbtEffectRunDrainMotes (BATTLE_EFFECT_PARM *args, Sint32 mode)Motes burst out of each target in turn and are pulled into the centre of the user's body, which glows white as they arrive (DRAIN_MOTES_MODE).

Description

Break and Drain. Part of battle_effect.c.

Macros in detail

DRAIN_TARGET_TICKS

#define DRAIN_TARGET_TICKS 20

Break and Drain take the targets in turn, this many ticks apart.

Referenced by btEffectRunBreak() and btEffectRunDrainMotes().

Definition at line 4 of file battle_effect_drain.c.

BREAK_SHARDS_PER_TARGET

#define BREAK_SHARDS_PER_TARGET 128

Referenced by btEffectRunBreak().

Definition at line 6 of file battle_effect_drain.c.

BREAK_FALL_TICKS

#define BREAK_FALL_TICKS 56

Break runs DRAIN_TARGET_TICKS a target and then this many while the last shards fall.

Referenced by btEffectRunBreak().

Definition at line 9 of file battle_effect_drain.c.

BREAK_HIT_TICK

#define BREAK_HIT_TICK 32

Referenced by btEffectRunBreak().

Definition at line 10 of file battle_effect_drain.c.

BREAK_SHARD_GROUND

#define BREAK_SHARD_GROUND 112

The canvas row below which a falling shard goes out.

Referenced by btEffectRunBreak().

Definition at line 12 of file battle_effect_drain.c.

DRAIN_MOTES_PER_TARGET

#define DRAIN_MOTES_PER_TARGET 128

Referenced by btEffectRunDrainMotes().

Definition at line 163 of file battle_effect_drain.c.

DRAIN_DRAWN

#define DRAIN_DRAWN 32

motes drawn for each target

Referenced by btEffectRunDrainMotes().

Definition at line 164 of file battle_effect_drain.c.

DRAIN_END_TICKS

#define DRAIN_END_TICKS 72

Drain runs DRAIN_TARGET_TICKS a target and then this many; the user glows from DRAIN_GLOW_TICK until DRAIN_GLOW_END_TICKS before the end.

Referenced by btEffectRunDrainMotes().

Definition at line 167 of file battle_effect_drain.c.

DRAIN_GLOW_TICK

#define DRAIN_GLOW_TICK 40

Referenced by btEffectRunDrainMotes().

Definition at line 168 of file battle_effect_drain.c.

DRAIN_GLOW_END_TICKS

#define DRAIN_GLOW_END_TICKS 20

Referenced by btEffectRunDrainMotes().

Definition at line 169 of file battle_effect_drain.c.

DRAIN_HIT_TICK

#define DRAIN_HIT_TICK 64

Referenced by btEffectRunDrainMotes().

Definition at line 170 of file battle_effect_drain.c.

DRAIN_PULL_DELAY

#define DRAIN_PULL_DELAY 10

A mote homes in on the user this many ticks after its target's turn, each mote a tick after the one before, gaining a 256th of the distance a tick.

Referenced by btEffectRunDrainMotes().

Definition at line 173 of file battle_effect_drain.c.

DRAIN_PULL

#define DRAIN_PULL(distance) ((distance) >> 8)

Referenced by btEffectRunDrainMotes().

Definition at line 174 of file battle_effect_drain.c.

DRAIN_ARRIVAL_DISTANCE

#define DRAIN_ARRIVAL_DISTANCE 16

A mote goes out within this many pixels of the middle of the user, across and in depth.

Referenced by btEffectRunDrainMotes().

Definition at line 177 of file battle_effect_drain.c.

TRUE_COLLIDE_VIOLET

#define TRUE_COLLIDE_VIOLET 21

The red and blue of True Collide's first colour, a dim violet.

Referenced by btEffectRunDrainMotes().

Definition at line 179 of file battle_effect_drain.c.

Enumerations in detail

DRAIN_MOTES_MODE

enum DRAIN_MOTES_MODE

What btEffectRunDrainMotes draws, each named for the ability that plays it.

EnumeratorValueDescription
DRAIN_MOTES_DRAINwhite and pale blue motes with long trails
DRAIN_MOTES_PSY_DRAINgolden motes with long trails
DRAIN_MOTES_TRUE_COLLIDElarge violet orbs, dark at the heart

Definition at line 15 of file battle_effect_drain.c.

Functions in detail

btEffectRunBreak

void btEffectRunBreak(BATTLE_EFFECT_PARM *args)

Ice shards burst up from each target in turn, tinting it, and fall away.

Abilities: Break.

References btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), DrainGravities, Sint32, syCos(), syRandom(), syResourceGetTableEntry(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 25 of file battle_effect_drain.c.

btEffectRunDrain

void btEffectRunDrain(BATTLE_EFFECT_PARM *args)

Motes of light burst from each target in turn, and are pulled into the centre of the user's body: white for the basic variant, golden for the stronger.

Abilities: Drain, Psy Drain.

References btEffectRunDrainMotes() and Sint32.

Referenced by BattleEffectHandlers.

Definition at line 146 of file battle_effect_drain.c.

btEffectRunTrueCollide

void btEffectRunTrueCollide(BATTLE_EFFECT_PARM *args)

Large violet orbs burst from each target in turn, and are pulled into the centre of the user's body.

Abilities: True Collide.

References btEffectRunDrainMotes().

Referenced by BattleEffectHandlers.

Definition at line 158 of file battle_effect_drain.c.

btEffectRunDrainMotes

void btEffectRunDrainMotes(BATTLE_EFFECT_PARM *args, Sint32 mode)

Motes burst out of each target in turn and are pulled into the centre of the user's body, which glows white as they arrive (DRAIN_MOTES_MODE).

References btEffectDrawShadedDisc(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), DrainMotesSizes, Sint32, syRandom(), syResourceGetTableEntry(), sySetEvent() and sySoundPlayStub().

Referenced by btEffectRunDrain() and btEffectRunTrueCollide().

Definition at line 183 of file battle_effect_drain.c.