Skip to Content
The Alchemy Project

struct FIELD_EFFECT_STATE

The state of a field Psynergy (heap slot HEAP_SLOT_FIELD_EFFECT): its caster and target, where it takes place, the map state it restores, its field effect sprites and the sprite and stage a lasting Psynergy keeps.

Declared in field_psynergy_state.h.

Fields

NameDescription
Uint16angleThe caster's facing, rounded to four directions, 1/65536 turns.
Uint16angle8The caster's facing, rounded to eight directions, 1/65536 turns.
FIXEDx16.16 fixed-point pixels.
FIXEDy16.16 fixed-point pixels.
FIXEDz16.16 fixed-point pixels.
struct ACTOR *casterThe caster's actor.
struct ACTOR *targetThe target's actor, or NULL.
Sint16casterIdThe caster's actor id.
Sint16targetIdThe target's actor id, -1 for none.
Sint16abilityThe ability id.
Sint16fieldPsynergyThe ability's field Psynergy kind.
Sint8aimAheadSet at the start; cleared once the target has been dispatched.
Uint8modeWhere it runs; ACTOR_SYSTEM_WORLD_MAP on the World Map.
Sint8flashCasterSet at the start: the caster flashes with a sound.
Sint8announceNameSet at the start: the ability's name is announced.
void (*finishCallback )(void)Run, when set, as the
Uint8unusedAfterFinish [12]Psynergy ends.
Sint8sceneVariantSet by some scenes before a field Psynergy; it treats the target differently with it.
Sint8childModeSet by some scenes:
Uint8paddingAfterChildMode [2]the Psynergy leaves the target be.
void (*savedCallback )(union FIELD_OBJECT *object)The target's update
const Sint32 *savedScriptfunction and script, saved at the start and restored when the Psynergy lets it go.
Uint8savedPaletteThe target's first sprite animation's colour mode.
Uint8litSet in a few scenes (Gabomba Catacombs, Tundaria Tower, Jupiter Lighthouse's aerie, Loho) before a field Psynergy.
Uint16freeBlocks512 less the free VRAM cache blocks at the start.
Sint32savedShakeXThe map's shake and its decay, restored when the field Psynergy ends.
Sint32savedShakeY
Sint32savedShakeDecay
FIELD_PARTICLEparticles [PSYNERGY_EFFECT_SLOT_COUNT]Its field effect sprites.
Sint16arcTileSlotThe VRAM cache entry of the falling arcs' tiles.
Sint8msgModeThe announcement's box mode: 1, a script adds 8.
Uint8msgShownSet while the announcement's message is open.
Uint8unusedAfterMsgShown [4]No code names it.
Uint8savedPriorityFlagsThe caster's priority
Uint8savedSpritePriorityflags and sprite priority, saved at the start and restored as it ends.
Uint8unusedAfterSavedSpritePriority [170]No code names it.
Sint16stageA lasting Psynergy's
Sint16framestage and tick, passed to its script as it runs.
EFFECT_SPRspriteA field Psynergy's own sprite on screen.
Sint16spriteVramSlotIts VRAM cache entry.
Sint16spriteActiveNonzero while sprite is drawn.

Description

The state of a field Psynergy (heap slot HEAP_SLOT_FIELD_EFFECT): its caster and target, where it takes place, the map state it restores, its field effect sprites and the sprite and stage a lasting Psynergy keeps.

struct FIELD_EFFECT_STATE

Referenced by dbIncreaseItemAndLevelKeepPortraitBrowserInPlace(), fdActorLiftTargetBlock(), fdActorSpawn(), fdAvoidDropRing(), fdBattleEffectStopMainActor(), fdBattleEffectUpdateAllEffectSlots(), fdBlazeUpdateSpray(), fdCycloneCarryLeader(), fdCycloneLiftLeader(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectInitSlots(), fdEffectReleaseSlots(), fdEffectRunSparkEmitter(), fdEffectSpawnBurstParticleField(), fdEffectSpawnFallingParticles(), fdEffectUpdateAllSlots(), fdEffectUpdateHaltParticle(), fdEffectUpdateRadialBurst(), fdEffectUpdateShrinkingOrbitActor(), fdParticleBurstStart(), fdPoundSinkTarget(), fdPsynergyArrow(), fdPsynergyAvoid(), fdPsynergyBlaze(), fdPsynergyBurst(), fdPsynergyCarry(), fdPsynergyCatch(), fdPsynergyCyclone(), fdPsynergyDispatch(), fdPsynergyDouse(), fdPsynergyDrawCanvasSprite(), fdPsynergyEnd(), fdPsynergyEndCloak(), fdPsynergyEndReveal(), fdPsynergyEndSand(), fdPsynergyFadeToCastColor(), fdPsynergyFinishMindRead(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyFrostOnTarget(), fdPsynergyGatherNearbyMetatiles(), fdPsynergyGrind(), fdPsynergyGrindOnTarget(), fdPsynergyGrowFromCaster(), fdPsynergyGrowth(), fdPsynergyGrowthOnTarget(), fdPsynergyHalt() and 71 more.

Definition at line 72 of file field_psynergy_state.h.

Fields in detail

angle

Uint16 angle

The caster's facing, rounded to four directions, 1/65536 turns.

angle8

Uint16 angle8

The caster's facing, rounded to eight directions, 1/65536 turns.

x

FIXED x

16.16 fixed-point pixels.

y

FIXED y

16.16 fixed-point pixels.

z

FIXED z

16.16 fixed-point pixels.

caster

struct ACTOR *caster

The caster's actor.

target

struct ACTOR *target

The target's actor, or NULL.

casterId

Sint16 casterId

The caster's actor id.

targetId

Sint16 targetId

The target's actor id, -1 for none.

ability

Sint16 ability

The ability id.

fieldPsynergy

Sint16 fieldPsynergy

The ability's field Psynergy kind.

aimAhead

Sint8 aimAhead

Set at the start; cleared once the target has been dispatched.

mode

Uint8 mode

Where it runs; ACTOR_SYSTEM_WORLD_MAP on the World Map.

flashCaster

Sint8 flashCaster

Set at the start: the caster flashes with a sound.

announceName

Sint8 announceName

Set at the start: the ability's name is announced.

finishCallback

void (*finishCallback)(void)

Run, when set, as the

unusedAfterFinish

Uint8 unusedAfterFinish[12]

Psynergy ends.

sceneVariant

Sint8 sceneVariant

Set by some scenes before a field Psynergy; it treats the target differently with it.

childMode

Sint8 childMode

Set by some scenes:

paddingAfterChildMode

Uint8 paddingAfterChildMode[2]

the Psynergy leaves the target be.

savedCallback

void (*savedCallback)(union FIELD_OBJECT *object)

The target's update

savedScript

const Sint32 *savedScript

function and script, saved at the start and restored when the Psynergy lets it go.

savedPalette

Uint8 savedPalette

The target's first sprite animation's colour mode.

lit

Uint8 lit

Set in a few scenes (Gabomba Catacombs, Tundaria Tower, Jupiter Lighthouse's aerie, Loho) before a field Psynergy.

freeBlocks

Uint16 freeBlocks

512 less the free VRAM cache blocks at the start.

savedShakeX

Sint32 savedShakeX

The map's shake and its decay, restored when the field Psynergy ends.

savedShakeY

Sint32 savedShakeY

savedShakeDecay

Sint32 savedShakeDecay

particles

FIELD_PARTICLE particles[PSYNERGY_EFFECT_SLOT_COUNT]

Its field effect sprites.

arcTileSlot

Sint16 arcTileSlot

The VRAM cache entry of the falling arcs' tiles.

msgMode

Sint8 msgMode

The announcement's box mode: 1, a script adds 8.

msgShown

Uint8 msgShown

Set while the announcement's message is open.

unusedAfterMsgShown

Uint8 unusedAfterMsgShown[4]

No code names it.

savedPriorityFlags

Uint8 savedPriorityFlags

The caster's priority

savedSpritePriority

Uint8 savedSpritePriority

flags and sprite priority, saved at the start and restored as it ends.

unusedAfterSavedSpritePriority

Uint8 unusedAfterSavedSpritePriority[170]

No code names it.

stage

Sint16 stage

A lasting Psynergy's

frame

Sint16 frame

stage and tick, passed to its script as it runs.

sprite

EFFECT_SPR sprite

A field Psynergy's own sprite on screen.

spriteVramSlot

Sint16 spriteVramSlot

Its VRAM cache entry.

spriteActive

Sint16 spriteActive

Nonzero while sprite is drawn.