5#include "sprite/npc/ShyGuy.h"
6#include "sprite/npc/SpearGuy.h"
8#define NAMESPACE A(spear_guy)
10extern s32 N(ShyGuyAnims)[];
23extern EvtScript N(EVS_ShyGuy_HandleEvent);
34 AVAL_State_SpearForward = 0,
35 AVAL_State_SpearUpward = 1,
36 AVAL_State_ShyGuy = 2,
47s32 N(SpearForwardAnims)[] = {
60s32 N(SpearUpwardAnims)[] = {
73s32 N(SpearAnims)[] = {
78s32 N(GrassSkirtAnims)[] = {
83s32 N(SpearGuyDefense)[] = {
89s32 N(ShyGuyDefense)[] = {
95s32 N(SpearGuyStatusTable)[] = {
120s32 N(ShyGuyStatusTable)[] = {
148 .index = PRT_SPEAR_GUY,
149 .posOffset = { 0, 0, 0 },
150 .targetOffset = { 0, 22 },
152 .idleAnimations = N(SpearForwardAnims),
153 .defenseTable = N(SpearGuyDefense),
155 .elementImmunityFlags = 0,
156 .projectileTargetOffset = { -3, -8 },
160 .index = PRT_SHY_GUY,
161 .posOffset = { 0, 0, 0 },
162 .targetOffset = { 0, 24 },
164 .idleAnimations = N(ShyGuyAnims),
165 .defenseTable = N(ShyGuyDefense),
167 .elementImmunityFlags = 0,
168 .projectileTargetOffset = { -1, -10 },
173 .posOffset = { 0, 0, 0 },
174 .targetOffset = { 0, 0 },
176 .idleAnimations = N(SpearAnims),
177 .defenseTable = N(ShyGuyDefense),
179 .elementImmunityFlags = 0,
180 .projectileTargetOffset = { 0, 0 },
184 .index = PRT_GRASS_SKIRT,
185 .posOffset = { 0, 0, 0 },
186 .targetOffset = { 0, 0 },
188 .idleAnimations = N(GrassSkirtAnims),
189 .defenseTable = N(ShyGuyDefense),
191 .elementImmunityFlags = 0,
192 .projectileTargetOffset = { 0, 0 },
198 .type = ACTOR_TYPE_SPEAR_GUY,
199 .level = ACTOR_LEVEL_SPEAR_GUY,
202 .partsData = N(ActorParts),
203 .initScript = &N(EVS_Init),
204 .statusTable = N(SpearGuyStatusTable),
207 .hurricaneChance = 80,
209 .upAndAwayChance = 95,
211 .powerBounceChance = 85,
214 .healthBarOffset = { 0, 0 },
215 .statusIconOffset = { -10, 20 },
216 .statusTextOffset = { 10, 20 },
223 CaseEq(AVAL_State_SpearForward)
224 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_SpearForward)
227 CaseEq(AVAL_State_SpearUpward)
239 CaseEq(AVAL_State_SpearForward)
241 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04)
242 CaseEq(AVAL_State_SpearUpward)
245 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03)
258 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03)
289 CaseEq(AVAL_State_SpearForward)
300 CaseEq(AVAL_State_SpearUpward)
318 CaseEq(AVAL_State_SpearForward)
319 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04)
320 CaseEq(AVAL_State_SpearUpward)
321 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03)
453 CaseEq(AVAL_State_SpearForward)
457 CaseEq(AVAL_State_SpearUpward)
484 CaseEq(AVAL_State_SpearForward)
504 CaseEq(AVAL_State_SpearUpward)
542 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06)
556 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04)
558 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1A)
566 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B)
592 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B)
616 Call(MoveBattleCamOver, 15)
619 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05)
630 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05)
633 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10)
644 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05)
647 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10)
652 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05)
659 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E)
663 Call(InitTargetIterator)
668 Call(SetAnimation,
LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04)
673 Call(SetActorVar,
LVar1, AVAR_State, AVAL_State_SpearUpward)
674 Call(SetIdleAnimations,
LVar1, PRT_SPEAR_GUY,
Ref(N(SpearUpwardAnims)))
676 Call(SetAnimation,
LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03)
686 Call(InitTargetIterator)
698 Call(SummonEnemy,
Ref(N(ForwardSpearFormation)), FALSE)
700 Call(SummonEnemy,
Ref(N(UpwardSpearFormation)), FALSE)
704 Call(SetAnimation,
LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10)
727 Call(SetAnimation,
LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E)
730 Call(SetAnimation,
LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04)
732 Call(SetAnimation,
LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03)
740 Call(SetActorVar,
LVarB, AVAR_Generation, 1)
742 Call(SetActorVar,
LVarB, AVAR_Generation, 2)
754 ACTOR_BY_POS(NAMESPACE, N(SummonPos), 100, AVAL_State_SpearForward),
758 ACTOR_BY_POS(NAMESPACE, N(SummonPos), 100, AVAL_State_SpearUpward),
766 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim13)
768 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim18)
817 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06)
823 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim15)
846 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11)
849 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17)
858 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12)
899 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11)
902 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17)
911 Call(SetAnimation,
ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12)
954 Call(InitTargetIterator)
997 Call(InitTargetIterator)
1002 CaseEq(ACTOR_TYPE_JUNGLE_FUZZY)
1010 CaseEq(ACTOR_TYPE_SPEAR_GUY)
1031 Call(InitTargetIterator)
1051 Set(
LVar0, AVAL_State_SpearForward)
1070 ExecWait(N(EVS_GetAvailableColumn))
1076 ExecWait(N(EVS_CountActiveSummoners))
1116s32 N(ShyGuyAnims)[] = {
1145 Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13)
1148 Call(SetProjectileTargetOffset,
ACTOR_SELF, PRT_SHY_GUY, -1, -10)
1149 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
1162 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01)
1268 Call(MoveBattleCamOver, 20)
1270 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03)
1287 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04)
1290 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05)
1314 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01)
1327 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04)
1334 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05)
1340 Call(MoveBattleCamOver, 15)
1347 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01)
1363 Call(MoveBattleCamOver, 20)
1366 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09)
1368 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03)
1378 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04)
1389 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09)
1392 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A)
1404 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05)
1416 Call(MoveBattleCamOver, 15)
1425 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01)
1432 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09)
1435 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A)
1446 Call(MoveBattleCamOver, 15)
1477 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09)
1479 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim07)
1490 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim10)
1496 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim11)
1498 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim13)
1509 Call(SetAnimation,
ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01)
#define STATUS_FLAGS_IMMOBILIZED
@ ACTOR_SOUND_WALK_INCREMENT
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_SPIKY_FRONT
Player takes spike damage from hammer attacks.
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
@ ENCOUNTER_TRIGGER_HAMMER
@ ENCOUNTER_TRIGGER_PARTNER
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ TARGET_FLAG_PRIMARY_ONLY
@ SOUND_ID_TRIGGER_CHANGE_SOUND
@ SOUND_SPEAR_GUY_DANCE_1
@ SOUND_SPEAR_GUY_DANCE_2
@ SOUND_SPEAR_GUY_RIP_SKIRT
@ ACTOR_FLAG_TYPE_CHANGED
Indicates actors type has changed, triggers recheck for if HP bar should be shown based on tattle sta...
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ ACTOR_PART_FLAG_NO_SHADOW
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
@ ACTOR_PART_FLAG_DAMAGE_IMMUNE
electrified Plays extra hurt SFX?
@ ACTOR_PART_FLAG_INVISIBLE
@ DAMAGE_TYPE_TRIGGER_LUCKY
EvtScript EVS_Enemy_ReturnHome
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
#define Switch(LVAR)
Marks the start of a switch statement.
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
#define Sub(VAR, INT_VALUE)
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Mod(VAR, INT_VALUE)
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
#define Goto(LABEL_ID)
Moves execution to the given label.
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
#define EndIf
Marks the end of an if statement or an else block.
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define NPC_DISPOSE_LOCATION
#define PlayEffect(args...)
#define EndSwitch
Marks the end of a switch statement and any case.
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Loop(TIMES)
Marks the beginning of a loop.
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
#define Return
Kills the current EVT thread.
#define ACTOR_BY_POS(_name, _pos, _priority, args...)
@ AVAR_JungleFuzzy_Generation