3#include "sprite/npc/StoneChomp.h"
5#define NAMESPACE A(stone_chomp)
28 AVAR_EnableChainSounds = 8,
35s32 N(BasicAnims)[] = {
46s32 N(QuickBiteAnims)[] = {
68s32 N(SlowBiteAnims)[] = {
79s32 N(ChainAnims)[] = {
84s32 N(DefenseTable)[] = {
89s32 N(StatusTable)[] = {
118 .posOffset = { 0, 0, 0 },
119 .targetOffset = { 0, 24 },
121 .idleAnimations = N(BasicAnims),
122 .defenseTable = N(DefenseTable),
124 .elementImmunityFlags = 0,
125 .projectileTargetOffset = { 0, 0 },
130 .posOffset = { 0, 0, 0 },
131 .targetOffset = { -13, 40 },
133 .idleAnimations = N(BasicAnims),
134 .defenseTable = N(DefenseTable),
136 .elementImmunityFlags = 0,
137 .projectileTargetOffset = { 0, -14 },
141 .index = PRT_CHAIN_1,
142 .posOffset = { 0, 0, 0 },
143 .targetOffset = { 0, 12 },
145 .idleAnimations = N(ChainAnims),
146 .defenseTable = N(DefenseTable),
148 .elementImmunityFlags = 0,
149 .projectileTargetOffset = { 0, 0 },
153 .index = PRT_CHAIN_2,
154 .posOffset = { 0, 0, 0 },
155 .targetOffset = { 0, 12 },
157 .idleAnimations = N(ChainAnims),
158 .defenseTable = N(DefenseTable),
160 .elementImmunityFlags = 0,
161 .projectileTargetOffset = { 0, 0 },
165 .index = PRT_CHAIN_3,
166 .posOffset = { 0, 0, 0 },
167 .targetOffset = { 0, 12 },
169 .idleAnimations = N(ChainAnims),
170 .defenseTable = N(DefenseTable),
172 .elementImmunityFlags = 0,
173 .projectileTargetOffset = { 0, 0 },
177 .index = PRT_CHAIN_4,
178 .posOffset = { 0, 0, 0 },
179 .targetOffset = { 0, 12 },
181 .idleAnimations = N(ChainAnims),
182 .defenseTable = N(DefenseTable),
184 .elementImmunityFlags = 0,
185 .projectileTargetOffset = { 0, 0 },
189 .index = PRT_CHAIN_5,
190 .posOffset = { 0, 0, 0 },
191 .targetOffset = { 0, 12 },
193 .idleAnimations = N(ChainAnims),
194 .defenseTable = N(DefenseTable),
196 .elementImmunityFlags = 0,
197 .projectileTargetOffset = { 0, 0 },
201 .index = PRT_CHAIN_6,
202 .posOffset = { 0, 0, 0 },
203 .targetOffset = { 0, 12 },
205 .idleAnimations = N(ChainAnims),
206 .defenseTable = N(DefenseTable),
208 .elementImmunityFlags = 0,
209 .projectileTargetOffset = { 0, 0 },
213 .index = PRT_CHAIN_7,
214 .posOffset = { 0, 0, 0 },
215 .targetOffset = { 0, 12 },
217 .idleAnimations = N(ChainAnims),
218 .defenseTable = N(DefenseTable),
220 .elementImmunityFlags = 0,
221 .projectileTargetOffset = { 0, 0 },
225 .index = PRT_CHAIN_8,
226 .posOffset = { 0, 0, 0 },
227 .targetOffset = { 0, 12 },
229 .idleAnimations = N(ChainAnims),
230 .defenseTable = N(DefenseTable),
232 .elementImmunityFlags = 0,
233 .projectileTargetOffset = { 0, 0 },
239 .type = ACTOR_TYPE_STONE_CHOMP,
240 .level = ACTOR_LEVEL_STONE_CHOMP,
243 .partsData = N(ActorParts),
244 .initScript = &N(EVS_Init),
245 .statusTable = N(StatusTable),
248 .hurricaneChance = 25,
250 .upAndAwayChance = 95,
252 .powerBounceChance = 85,
255 .healthBarOffset = { 0, 0 },
256 .statusIconOffset = { -10, 20 },
257 .statusTextOffset = { 10, 20 },
260#define CHOMP_CHAIN_FIRST_PART_IDX PRT_CHAIN_1
261#define CHOMP_CHAIN_LAST_PART_IDX PRT_CHAIN_8
262#define CHOMP_CHAIN_AVAR_SOUNDS AVAR_EnableChainSounds
332 Loop(1 + (PRT_CHAIN_8 - PRT_CHAIN_1))
336 Call(N(ChompChainInit))
337 Exec(N(EVS_UpdateChain))
363 ExecWait(N(EVS_UpdateTargetPartPos))
379 ExecWait(N(EVS_UpdateTargetPartPos))
395 ExecWait(N(EVS_UpdateTargetPartPos))
409 ExecWait(N(EVS_UpdateTargetPartPos))
424 ExecWait(N(EVS_UpdateTargetPartPos))
438 ExecWait(N(EVS_UpdateTargetPartPos))
462 Call(N(ChompChainUpdate))
481 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain)
482 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain)
483 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain)
484 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain)
485 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain)
486 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain)
487 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain)
488 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain)
494 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain)
495 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain)
496 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain)
497 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain)
498 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain)
499 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain)
500 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain)
501 Call(SetAnimation,
ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain)
659 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_SlowBite)
#define STATUS_FLAGS_IMMOBILIZED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ ACTOR_PART_FLAG_TARGET_ONLY
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
@ ACTOR_PART_FLAG_NO_DECORATIONS
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
@ ACTOR_PART_FLAG_INVISIBLE
@ DAMAGE_TYPE_TRIGGER_LUCKY
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 RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(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 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 BreakLoop
Breaks out of the innermost loop.
#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 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 Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.