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_MOTE_SIZE 6A mote's size in pixels.
#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.

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.

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 btEffectRunDrain().

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 btEffectRunDrain().

Definition at line 145 of file battle_effect_drain.c.

DRAIN_DRAWN

#define DRAIN_DRAWN 32

Motes drawn for each target.

Referenced by btEffectRunDrain().

Definition at line 147 of file battle_effect_drain.c.

DRAIN_MOTE_SIZE

#define DRAIN_MOTE_SIZE 6

A mote's size in pixels.

Referenced by btEffectRunDrain().

Definition at line 149 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 btEffectRunDrain().

Definition at line 152 of file battle_effect_drain.c.

DRAIN_GLOW_TICK

#define DRAIN_GLOW_TICK 40

Referenced by btEffectRunDrain().

Definition at line 153 of file battle_effect_drain.c.

DRAIN_GLOW_END_TICKS

#define DRAIN_GLOW_END_TICKS 20

Referenced by btEffectRunDrain().

Definition at line 154 of file battle_effect_drain.c.

DRAIN_HIT_TICK

#define DRAIN_HIT_TICK 64

Referenced by btEffectRunDrain().

Definition at line 155 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 btEffectRunDrain().

Definition at line 158 of file battle_effect_drain.c.

DRAIN_PULL

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

Referenced by btEffectRunDrain().

Definition at line 159 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 btEffectRunDrain().

Definition at line 162 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.

Break
Break

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

Referenced by BattleEffectHandlers.

Definition at line 17 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.

Abilities: Drain, Psy Drain.

Drain
Drain
Psy Drain
Psy Drain

References btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), Sint32, state, syRandom(), syResourceGetTableEntry(), sySoundPlayStub() and syWordsCopy().

Referenced by BattleEffectHandlers.

Definition at line 168 of file battle_effect_drain.c.