Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_rushing_strike.c

Rushing strikes, where the user charges into its target (Bone Charge, Brute Force, Onslaught, Headbutt). More…

Included by battle_effect.c.

Macros

NameDescription
#defineRUSHING_STRIKE_SPARK_COUNT 64
#defineRUSHING_STRIKE_SPARK_TICKS 16The first pair of sparks' ticks of life; each pair after lives a tick longer.
#defineRUSHING_STRIKE_RING_BYTES PICTURE_BYTES(YELLOW_ORB_PACKED)One ring picture: a yellow orb packed to half width, in the map grid buffer.
#defineBLUE_BURST_WIDTH 40BlueBurstSheet's one picture, the top half of a burst: drawn as it is and mirrored top to bottom beneath, a 40x64 burst that follows the user in.
#defineBLUE_BURST_HEIGHT 32
#defineRUSHING_STRIKE_TICKS 60
#defineRUSHING_STRIKE_BURST_TICKS 15the burst follows the user in
#defineRUSHING_STRIKE_RING_TICK 8the ring flares at the target
#defineRUSHING_STRIKE_RING_TICKS 12its pictures, two ticks each
#defineRUSHING_STRIKE_TICK 10the user strikes

Enumerations

NameDescription
enumRUSHING_STRIKE_MODE { RUSHING_STRIKE_BONE_CHARGE, RUSHING_STRIKE_BRUTE_FORCE, RUSH … }The palette of a rushing strike's sparks (btEffectRunRushingStrike), each named for the ability that plays it and borrowed from another effect's sheet.

Functions

NameDescription
voidbtEffectPackYellowOrbs (Uint8 *src, Uint8 *dest, Sint32 stride, Sint32 rowCount)Squeezes the six yellow orb pictures to half width, keeping every second pixel, for the ring that flares where a rushing strike hits.
voidbtEffectRunBoneCharge (BATTLE_EFFECT_PARM *args)Rushes the target and scatters sparks in the fire pillar palette.
voidbtEffectRunBruteForce (BATTLE_EFFECT_PARM *args)Rushes the target and scatters sparks in the ice-block palette.
voidbtEffectRunOnslaught (BATTLE_EFFECT_PARM *args)Rushes the target and scatters sparks in the pink-burst palette.
voidbtEffectRunHeadbutt (BATTLE_EFFECT_PARM *args)Rushes the target and scatters sparks in the blast palette.
voidbtEffectRunRushingStrike (BATTLE_EFFECT_PARM *args, Sint32 mode)The user rushes at the first target; a ring flares where it hits and sparks scatter.

Description

Rushing strikes, where the user charges into its target (Bone Charge, Brute Force, Onslaught, Headbutt). Part of battle_effect.c.

Macros in detail

RUSHING_STRIKE_SPARK_COUNT

#define RUSHING_STRIKE_SPARK_COUNT 64

Referenced by btEffectRunRushingStrike().

Definition at line 28 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_SPARK_TICKS

#define RUSHING_STRIKE_SPARK_TICKS 16

The first pair of sparks' ticks of life; each pair after lives a tick longer.

Referenced by btEffectRunRushingStrike().

Definition at line 30 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_RING_BYTES

#define RUSHING_STRIKE_RING_BYTES PICTURE_BYTES(YELLOW_ORB_PACKED)

One ring picture: a yellow orb packed to half width, in the map grid buffer.

Referenced by btEffectRunRushingStrike().

Definition at line 32 of file battle_effect_rushing_strike.c.

BLUE_BURST_WIDTH

#define BLUE_BURST_WIDTH 40

BlueBurstSheet's one picture, the top half of a burst: drawn as it is and mirrored top to bottom beneath, a 40x64 burst that follows the user in.

Referenced by btEffectRunRushingStrike().

Definition at line 78 of file battle_effect_rushing_strike.c.

BLUE_BURST_HEIGHT

#define BLUE_BURST_HEIGHT 32

Referenced by btEffectRunRushingStrike().

Definition at line 79 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_TICKS

#define RUSHING_STRIKE_TICKS 60

Referenced by btEffectRunRushingStrike().

Definition at line 80 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_BURST_TICKS

#define RUSHING_STRIKE_BURST_TICKS 15

the burst follows the user in

Referenced by btEffectRunRushingStrike().

Definition at line 81 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_RING_TICK

#define RUSHING_STRIKE_RING_TICK 8

the ring flares at the target

Referenced by btEffectRunRushingStrike().

Definition at line 82 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_RING_TICKS

#define RUSHING_STRIKE_RING_TICKS 12

its pictures, two ticks each

Referenced by btEffectRunRushingStrike().

Definition at line 83 of file battle_effect_rushing_strike.c.

RUSHING_STRIKE_TICK

#define RUSHING_STRIKE_TICK 10

the user strikes

Referenced by btEffectRunRushingStrike().

Definition at line 84 of file battle_effect_rushing_strike.c.

Enumerations in detail

RUSHING_STRIKE_MODE

enum RUSHING_STRIKE_MODE

The palette of a rushing strike's sparks (btEffectRunRushingStrike), each named for the ability that plays it and borrowed from another effect's sheet.

EnumeratorValueDescription
RUSHING_STRIKE_BONE_CHARGEthe fire pillar's
RUSHING_STRIKE_BRUTE_FORCEthe ice block's
RUSHING_STRIKE_ONSLAUGHTthe pink burst's
RUSHING_STRIKE_HEADBUTTthe blast's

Definition at line 36 of file battle_effect_rushing_strike.c.

Functions in detail

btEffectPackYellowOrbs

void btEffectPackYellowOrbs(Uint8 *src, Uint8 *dest, Sint32 stride, Sint32 rowCount)

Squeezes the six yellow orb pictures to half width, keeping every second pixel, for the ring that flares where a rushing strike hits. It always packs the orbs' own rows; rowCount is not read.

References Sint32.

Referenced by btEffectRunCastingImpact() and btEffectRunRushingStrike().

Definition at line 7 of file battle_effect_rushing_strike.c.

btEffectRunBoneCharge

void btEffectRunBoneCharge(BATTLE_EFFECT_PARM *args)

Rushes the target and scatters sparks in the fire pillar palette.

Abilities: Bone Charge.

References btEffectRunRushingStrike().

Referenced by BattleEffectHandlers.

Definition at line 47 of file battle_effect_rushing_strike.c.

btEffectRunBruteForce

void btEffectRunBruteForce(BATTLE_EFFECT_PARM *args)

Rushes the target and scatters sparks in the ice-block palette.

Abilities: Brute Force.

References btEffectRunRushingStrike().

Referenced by BattleEffectHandlers.

Definition at line 55 of file battle_effect_rushing_strike.c.

btEffectRunOnslaught

void btEffectRunOnslaught(BATTLE_EFFECT_PARM *args)

Rushes the target and scatters sparks in the pink-burst palette.

Abilities: Onslaught.

References btEffectRunRushingStrike().

Referenced by BattleEffectHandlers.

Definition at line 63 of file battle_effect_rushing_strike.c.

btEffectRunHeadbutt

void btEffectRunHeadbutt(BATTLE_EFFECT_PARM *args)

Rushes the target and scatters sparks in the blast palette.

Abilities: Headbutt.

References btEffectRunRushingStrike().

Referenced by BattleEffectHandlers.

Definition at line 71 of file battle_effect_rushing_strike.c.

btEffectRunRushingStrike

void btEffectRunRushingStrike(BATTLE_EFFECT_PARM *args, Sint32 mode)

The user rushes at the first target; a ring flares where it hits and sparks scatter.

References btCameraShake(), btEffectPackYellowOrbs(), btEffectSetApproachMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btProjectionUnit(), btResourceLoadAndDecompress(), Sint32, state, syRandom(), syResourceGetTableEntry() and syWordsCopy().

Referenced by btEffectRunBoneCharge(), btEffectRunBruteForce(), btEffectRunHeadbutt() and btEffectRunOnslaught().

Definition at line 88 of file battle_effect_rushing_strike.c.