Alchemy
Loading...
Searching...
No Matches

target_strike.c File Reference

Monster bites, fangs and slashes on one target. More...

Go to the source code of this file.

Macros

#define TARGET_STRIKE_SPARKS   ((struct EffectStep *)(Ram_MapCellBuffer + 0x3800))
 The strike sparks, 512 of them, live after the motes in PARTICLES.
#define TARGET_STRIKE_SMOKE_CELLS   0x3200
 The smoke pictures in the sheet: six 24x48 puffs.
#define TARGET_STRIKE_VALUE(mode, field)
 Column field of style mode's row of gTargetStrike_Records.

Enumerations

enum  {
  TARGET_STRIKE_KIND , TARGET_STRIKE_HITS , TARGET_STRIKE_FLAGS , TARGET_STRIKE_COLOUR ,
  TARGET_STRIKE_IMAGE_FRAMES , TARGET_STRIKE_COMPOSITE , TARGET_STRIKE_FRAMES
}
 The columns of gTargetStrike_Records. More...
enum  {
  TARGET_STRIKE_STYLE_BLUE_SPARK_COLUMNS = 0 , TARGET_STRIKE_STYLE_LIME_SMOKE_COLUMN = 1 , TARGET_STRIKE_STYLE_PINK_SMOKE_COLUMNS = 2 , TARGET_STRIKE_STYLE_EMBER_DRAIN_COLUMNS = 3 ,
  TARGET_STRIKE_STYLE_MARS_DRAIN_COLUMNS = 4 , TARGET_STRIKE_STYLE_LIGHTNING_GLINT_COLUMNS = 5 , TARGET_STRIKE_STYLE_LIGHTNING_GLINT_SLASH = 6 , TARGET_STRIKE_STYLE_LIGHTNING_SPARK_SLASHES = 7 ,
  TARGET_STRIKE_STYLE_MARS_HEAVY_SLASH = 8 , TARGET_STRIKE_STYLE_LIME_SMOKE_SLASH = 9 , TARGET_STRIKE_STYLE_MARS_SMOKE_COLUMN = 10 , TARGET_STRIKE_STYLE_MARS_ADDITIVE_DRAIN_COLUMNS = 11
}
 The twelve styles, rows of gTargetStrike_Records. More...

Functions

void BattleFx_RunNumbingSting (struct BattleEffectArgument *effect)
 One slash with glints, lightning colours.
void BattleFx_RunCannibalFang (struct BattleEffectArgument *effect)
 Three ember columns that drain the target into the user.
void BattleFx_RunPoisonousBite (struct BattleEffectArgument *effect)
 One lime column with smoke.
void BattleFx_RunRabidFang (struct BattleEffectArgument *effect)
 One column with smoke, Mars Djinn colours.
void BattleFx_RunElectricBite (struct BattleEffectArgument *effect)
 Three lightning columns with glints.
void BattleFx_RunPoisonTail (struct BattleEffectArgument *effect)
 One lime slash with smoke.
void BattleFx_RunVampiricFang (struct BattleEffectArgument *effect)
 Three columns that drain the target, Mars Djinn colours.
void BattleFx_RunDoubleFang (struct BattleEffectArgument *effect)
 Two blue columns with sparks.
void BattleFx_RunMortalBlow (struct BattleEffectArgument *effect)
 One heavy slash with sparks, Mars Djinn colours.
void BattleFx_RunTwinBeaks (struct BattleEffectArgument *effect)
 Two slashes with sparks, lightning colours.
void BattleFx_RunAcidBite (struct BattleEffectArgument *effect)
 Three pink columns with smoke.
void BattleFx_RunDrainFang (struct BattleEffectArgument *effect)
 Three additive columns that drain the target with large motes, Mars Djinn colours.
void BattleFx_RunTargetStrike (struct BattleEffectArgument *effect, s32 mode)
 Strikes the first target TARGET_STRIKE_HITS times with a sideways slash or a column of light, with the extras its flags choose, and lets the battle show the damage on the hits.

Detailed Description

Monster bites, fangs and slashes on one target.

Part of effect.c, the battle effect object, compiled only through it.

Definition in file target_strike.c.

Macro Definition Documentation

◆ TARGET_STRIKE_SPARKS

#define TARGET_STRIKE_SPARKS   ((struct EffectStep *)(Ram_MapCellBuffer + 0x3800))

The strike sparks, 512 of them, live after the motes in PARTICLES.

Only the first 128 are drawn; a heavy hit lights all 512.

Definition at line 12 of file target_strike.c.

Referenced by BattleFx_RunTargetStrike().

◆ TARGET_STRIKE_SMOKE_CELLS

#define TARGET_STRIKE_SMOKE_CELLS   0x3200

The smoke pictures in the sheet: six 24x48 puffs.

Definition at line 15 of file target_strike.c.

Referenced by BattleFx_RunTargetStrike().

◆ TARGET_STRIKE_VALUE

#define TARGET_STRIKE_VALUE ( mode,
field )
Value:
gTargetStrike_Records[(mode)][(field)]
u8 gTargetStrike_Records[][7]
Each of the twelve target strike styles, by the TARGET_STRIKE_ columns (target_strike....

Column field of style mode's row of gTargetStrike_Records.

Definition at line 18 of file target_strike.c.

Referenced by BattleFx_RunTargetStrike().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The columns of gTargetStrike_Records.

Enumerator
TARGET_STRIKE_KIND 

STRIKE_KIND_SLASH or STRIKE_KIND_COLUMN.

TARGET_STRIKE_HITS 

how many times the target is struck

TARGET_STRIKE_FLAGS 

STRIKE_SMOKE and so on.

TARGET_STRIKE_COLOUR 

background palette, 0 to 5 (see below)

TARGET_STRIKE_IMAGE_FRAMES 

frames each strike image is shown

TARGET_STRIKE_COMPOSITE 

how the columns are drawn (COMPOSITE_MAX or _ADDITIVE)

TARGET_STRIKE_FRAMES 

length of the effect in frames

Definition at line 21 of file target_strike.c.

◆ anonymous enum

anonymous enum

The twelve styles, rows of gTargetStrike_Records.

Enumerator
TARGET_STRIKE_STYLE_BLUE_SPARK_COLUMNS 
TARGET_STRIKE_STYLE_LIME_SMOKE_COLUMN 
TARGET_STRIKE_STYLE_PINK_SMOKE_COLUMNS 
TARGET_STRIKE_STYLE_EMBER_DRAIN_COLUMNS 
TARGET_STRIKE_STYLE_MARS_DRAIN_COLUMNS 
TARGET_STRIKE_STYLE_LIGHTNING_GLINT_COLUMNS 
TARGET_STRIKE_STYLE_LIGHTNING_GLINT_SLASH 
TARGET_STRIKE_STYLE_LIGHTNING_SPARK_SLASHES 
TARGET_STRIKE_STYLE_MARS_HEAVY_SLASH 
TARGET_STRIKE_STYLE_LIME_SMOKE_SLASH 
TARGET_STRIKE_STYLE_MARS_SMOKE_COLUMN 
TARGET_STRIKE_STYLE_MARS_ADDITIVE_DRAIN_COLUMNS 

Definition at line 34 of file target_strike.c.

Function Documentation

◆ BattleFx_RunNumbingSting()

void BattleFx_RunNumbingSting ( struct BattleEffectArgument * effect)

One slash with glints, lightning colours.

Abilities: Numbing Sting (kind 313).

Definition at line 52 of file target_strike.c.

Referenced by BattleFx_RunNumbingSting().

◆ BattleFx_RunCannibalFang()

void BattleFx_RunCannibalFang ( struct BattleEffectArgument * effect)

Three ember columns that drain the target into the user.

Abilities: Cannibal Fang (kind 316).

Definition at line 58 of file target_strike.c.

Referenced by BattleFx_RunCannibalFang().

◆ BattleFx_RunPoisonousBite()

void BattleFx_RunPoisonousBite ( struct BattleEffectArgument * effect)

One lime column with smoke.

Abilities: Poisonous Bite (kind 318); Poison Fang (kind 323).

Definition at line 64 of file target_strike.c.

Referenced by BattleFx_RunPoisonousBite().

◆ BattleFx_RunRabidFang()

void BattleFx_RunRabidFang ( struct BattleEffectArgument * effect)

One column with smoke, Mars Djinn colours.

Abilities: Rabid Fang (kind 336).

Definition at line 70 of file target_strike.c.

Referenced by BattleFx_RunRabidFang().

◆ BattleFx_RunElectricBite()

void BattleFx_RunElectricBite ( struct BattleEffectArgument * effect)

Three lightning columns with glints.

Abilities: Electric Bite (kind 324).

Definition at line 76 of file target_strike.c.

Referenced by BattleFx_RunElectricBite().

◆ BattleFx_RunPoisonTail()

void BattleFx_RunPoisonTail ( struct BattleEffectArgument * effect)

One lime slash with smoke.

Abilities: Poison Tail (kind 325).

Definition at line 82 of file target_strike.c.

Referenced by BattleFx_RunPoisonTail().

◆ BattleFx_RunVampiricFang()

void BattleFx_RunVampiricFang ( struct BattleEffectArgument * effect)

Three columns that drain the target, Mars Djinn colours.

Abilities: Vampiric Fang (kind 327).

Definition at line 88 of file target_strike.c.

Referenced by BattleFx_RunVampiricFang().

◆ BattleFx_RunDoubleFang()

void BattleFx_RunDoubleFang ( struct BattleEffectArgument * effect)

Two blue columns with sparks.

Abilities: Double Fang (kind 332).

Definition at line 94 of file target_strike.c.

Referenced by BattleFx_RunDoubleFang().

◆ BattleFx_RunMortalBlow()

void BattleFx_RunMortalBlow ( struct BattleEffectArgument * effect)

One heavy slash with sparks, Mars Djinn colours.

Abilities: Mortal Blow (kind 333).

Definition at line 100 of file target_strike.c.

Referenced by BattleFx_RunMortalBlow().

◆ BattleFx_RunTwinBeaks()

void BattleFx_RunTwinBeaks ( struct BattleEffectArgument * effect)

Two slashes with sparks, lightning colours.

Abilities: Twin Beaks (kind 335).

Definition at line 106 of file target_strike.c.

Referenced by BattleFx_RunTwinBeaks().

◆ BattleFx_RunAcidBite()

void BattleFx_RunAcidBite ( struct BattleEffectArgument * effect)

Three pink columns with smoke.

Abilities: Acid Bite (kind 337).

Definition at line 112 of file target_strike.c.

Referenced by BattleFx_RunAcidBite().

◆ BattleFx_RunDrainFang()

void BattleFx_RunDrainFang ( struct BattleEffectArgument * effect)

Three additive columns that drain the target with large motes, Mars Djinn colours.

Abilities: Drain Fang (kind 386).

Definition at line 119 of file target_strike.c.

Referenced by BattleFx_RunDrainFang().

◆ BattleFx_RunTargetStrike()

void BattleFx_RunTargetStrike ( struct BattleEffectArgument * effect,
s32 mode )

Strikes the first target TARGET_STRIKE_HITS times with a sideways slash or a column of light, with the extras its flags choose, and lets the battle show the damage on the hits.

Called by the twelve wrappers above, from BattleFx_RunNumbingSting to BattleFx_RunDrainFang. Loads the style's colours over the first 64 of the background palette; uses work->particles 0 to 63 for smoke, PARTICLES 0 to 127 for motes and TARGET_STRIKE_SPARKS for sparks; builds and frees its blitters in both slots every frame, sets work->shakeFrames on each hit and lights the user while an absorb runs. Leaves the canvas layer closed.

mode : the style, 0 to 11, a row of gTargetStrike_Records.

Definition at line 135 of file target_strike.c.

Referenced by BattleFx_RunAcidBite(), BattleFx_RunCannibalFang(), BattleFx_RunDoubleFang(), BattleFx_RunDrainFang(), BattleFx_RunElectricBite(), BattleFx_RunMortalBlow(), BattleFx_RunNumbingSting(), BattleFx_RunPoisonousBite(), BattleFx_RunPoisonTail(), BattleFx_RunRabidFang(), BattleFx_RunTargetStrike(), BattleFx_RunTwinBeaks(), and BattleFx_RunVampiricFang().