Skip to Content
The Alchemy Project

struct FIELD_EFFECT_STATE

The state of a field Psynergy: its caster and target, where it takes place, the map state it restores and its 24 field effect sprites.

Declared in field_psynergy_state.h.

Fields

NameDescription
Sint32angle1/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.
Uint16abilityThe ability id.
Sint16fieldPsynergyThe ability's field kind (FIELD_PSYNERGY_).
Sint8aimAheadSet at the start: Force then aims in front of the caster; 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 Ply ends.
Uint8unusedAfterFinish [12]
Sint8sceneVariantSet by some scenes before a field Psynergy; Carry, Frost, Force and Reveal treat the target differently with it.
Sint8leaveTargetSet by some scenes: Frost and Force leave the target be.
Uint8paddingAfterLeaveTarget [2]Up to the word savedCallback starts on.
void (*savedCallback )(struct ACTOR *actor)The target's update function and script, saved at the start and restored when Move or Carry lets it go.
const Sint32 *savedScript
Uint8unusedAfterSavedScript [4]
Uint8savedPaletteThe target's first sprite's param, saved likewise.
Uint8litSet in two Mercury Lighthouse scenes: Douse lets particles sway down.
Sint16tileSlotResource entry holding the spark tiles.
Uint16unusedAfterTileSlot
Uint16freeBlocks512 less the free resource blocks at the start.
Sint32savedShakeXThe map's shake and its decay, restored when the field Psynergy ends.
Sint32savedShakeY
Sint32savedShakeDecay
FIELD_PARTICLEparticles [24]
Uint8unusedAfterSlots [2]
Sint16arcTileSlotResource entry of Avoid's falling arcs' tiles.
Sint8msgModeThe announcement's box mode: 1, a script adds 8.
Uint8paddingAtEnd [3]Up to the struct's word-aligned size.

Description

The state of a field Psynergy: its caster and target, where it takes place, the map state it restores and its 24 field effect sprites.

struct FIELD_EFFECT_STATE

Referenced by dbIncreaseItemAndLevelKeepPortraitBrowserInPlace(), dbMenuTestKeepIvyInPlace(), fdActorSpawn(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectInitSlots(), fdEffectReleaseSlots(), fdEffectRunSparkEmitter(), fdEffectSpawnBurstParticleField(), fdEffectSpawnDescendingArcParticles(), fdEffectSpawnFallingParticles(), fdEffectSpawnScaledArcActors(), fdEffectUpdateEffectSlots(), fdEffectUpdateHaltParticle(), fdEffectUpdateRadialBurst(), fdEffectUpdateShrinkingOrbitActor(), fdPsynergyAvoid(), fdPsynergyCatch(), fdPsynergyDispatch(), fdPsynergyDouse(), fdPsynergyEnd(), fdPsynergyEndReveal(), fdPsynergyFinishMindRead(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyFrostOnTarget(), fdPsynergyGrowth(), fdPsynergyGrowthOnTarget(), fdPsynergyHalt(), fdPsynergyHaltOnTarget(), fdPsynergyLiftOnTarget(), fdPsynergyLoadResources(), fdPsynergyMove(), fdPsynergyPly(), fdPsynergyRetreat(), fdPsynergyRun(), fdPsynergyRunEnd(), fdPsynergySetupActorPair(), fdPsynergyStartCast(), fdPsynergySteerLiftedTarget(), fdPsynergySteerPushedTarget(), fdPsynergyStopCasterUpdate(), fdPsynergyWhirlwind(), fdRetreatUpdateSpark(), scAltmillerCaveCheckPuddleCovered(), scAltmillerCaveEndReveal(), scAltmillerCaveFreezePuddle(), scAltmillerCaveReleaseWallBurst() and 16 more.

Definition at line 16 of file field_psynergy_state.h.

Fields in detail

angle

Sint32 angle

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

Uint16 ability

The ability id.

fieldPsynergy

Sint16 fieldPsynergy

The ability's field kind (FIELD_PSYNERGY_).

aimAhead

Sint8 aimAhead

Set at the start: Force then aims in front of the caster; 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 Ply ends.

unusedAfterFinish

Uint8 unusedAfterFinish[12]

sceneVariant

Sint8 sceneVariant

Set by some scenes before a field Psynergy; Carry, Frost, Force and Reveal treat the target differently with it.

leaveTarget

Sint8 leaveTarget

Set by some scenes: Frost and Force leave the target be.

paddingAfterLeaveTarget

Uint8 paddingAfterLeaveTarget[2]

Up to the word savedCallback starts on.

savedCallback

void (*savedCallback)(struct ACTOR *actor)

The target's update function and script, saved at the start and restored when Move or Carry lets it go.

savedScript

const Sint32 *savedScript

unusedAfterSavedScript

Uint8 unusedAfterSavedScript[4]

savedPalette

Uint8 savedPalette

The target's first sprite's param, saved likewise.

lit

Uint8 lit

Set in two Mercury Lighthouse scenes: Douse lets particles sway down.

tileSlot

Sint16 tileSlot

Resource entry holding the spark tiles.

unusedAfterTileSlot

Uint16 unusedAfterTileSlot

freeBlocks

Uint16 freeBlocks

512 less the free resource 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[24]

unusedAfterSlots

Uint8 unusedAfterSlots[2]

arcTileSlot

Sint16 arcTileSlot

Resource entry of Avoid's falling arcs' tiles.

msgMode

Sint8 msgMode

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

paddingAtEnd

Uint8 paddingAtEnd[3]

Up to the struct's word-aligned size.