src/field/script_commands_avoid.c
Avoid: the caster spins among falling arcs and flashes, and monsters attack less often until it wears off. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | AVOID_FLASHES 20 | white flashes, 5 ticks each |
#define | AVOID_BLINK_TICKS 70 | the outline flashes |
#define | AVOID_NOTE_TICK 15 | SE_NOTE_MID, into the outline's flashing |
Functions
| Name | Description | |
|---|---|---|
void | fdEffectBlinkAvoidCaster (void) | End of the Psynergy: switches the caster's sprite between SPRITE_FLAG_SHADOW | SPRITE_FLAG_OUTLINED and SPRITE_FLAG_SHADOW on a 5-tick cycle, so it flashes as a dark outline. |
void | fdEffectUpdateAvoidCaster (ACTOR *caster) | The caster during the Psynergy: sheds a pair of falling arcs every 5 ticks (7 on the World Map), and spins in phase 1, 3/64 turn a tick. |
void | fdPsynergyShowAvoidWoreOff (void) | Says that Avoid, or the Sacred Feather, has worn off: "Avoid's effects wore off." Clears MainRoutineStateWork.avoidDistance. |
void | fdPsynergyAvoid (void) | The caster spins among falling arcs and flashes white, then flashes as an outline, and encounters are kept away until Avoid wears off. |
Description
Avoid: the caster spins among falling arcs and flashes, and monsters attack
less often until it wears off. Part of script_commands.c.
Macros in detail
AVOID_FLASHES
#define AVOID_FLASHES 20
white flashes, 5 ticks each
Referenced by fdPsynergyAvoid().
Definition at line 74 of file script_commands_avoid.c.
AVOID_BLINK_TICKS
#define AVOID_BLINK_TICKS 70
the outline flashes
Referenced by fdPsynergyAvoid().
Definition at line 75 of file script_commands_avoid.c.
AVOID_NOTE_TICK
#define AVOID_NOTE_TICK 15
SE_NOTE_MID, into the outline's flashing
Referenced by fdPsynergyAvoid().
Definition at line 76 of file script_commands_avoid.c.
Functions in detail
fdEffectBlinkAvoidCaster
void fdEffectBlinkAvoidCaster(void)
End of the Psynergy: switches the caster's sprite between SPRITE_FLAG_SHADOW
| SPRITE_FLAG_OUTLINED and SPRITE_FLAG_SHADOW on a 5-tick cycle, so it
flashes as a dark outline.
References fdActorLookup(), MainRoutineStateWork, Sint32 and TickCount.
Referenced by fdPsynergyAvoid().
Definition at line 9 of file script_commands_avoid.c.
fdEffectUpdateAvoidCaster
void fdEffectUpdateAvoidCaster(ACTOR *caster)
The caster during the Psynergy: sheds a pair of falling arcs every 5 ticks (7 on the World Map), and spins in phase 1, 3/64 turn a tick.
References fdEffectSpawnDescendingArcParticles(), MainRoutineStateWork and Sint32.
Referenced by fdPsynergyAvoid().
Definition at line 35 of file script_commands_avoid.c.
fdPsynergyShowAvoidWoreOff
void fdPsynergyShowAvoidWoreOff(void)
Says that Avoid, or the Sacred Feather, has worn off: "Avoid's effects wore
off." Clears MainRoutineStateWork.avoidDistance. Reached through
fdPsynergyRunEnd when the Psynergy request the leader's walking raises as
Avoid runs out (field_engine_walking.c) is handled.
References MainRoutineStateWork, mnFieldMessageShowStub() and mnMessageArgumentPushStub().
Referenced by fdPsynergyRunEnd().
Definition at line 61 of file script_commands_avoid.c.
fdPsynergyAvoid
void fdPsynergyAvoid(void)
The caster spins among falling arcs and flashes white, then flashes as an outline, and encounters are kept away until Avoid wears off.
References fdActorSetSpriteColorModeStub(), fdActorSetSpriteFlagsStub(), fdEffectBlinkAvoidCaster(), fdEffectUpdateAvoidCaster(), FieldEffectArcSparkTiles, gmFlagGetStub(), MainRoutineStateWork, mnFieldMessageShowStub(), Sint32, syCloseEvent(), sySetEvent(), sySoundPlayStub(), sySynch(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().
Referenced by fdPsynergyDispatch() and fdPsynergyRun().
Definition at line 80 of file script_commands_avoid.c.