3#include "sprite/npc/Bzzap.h"
5#define NAMESPACE A(bzzap)
26s32 N(DefaultAnims)[] = {
39s32 N(DefenseTable)[] = {
44s32 N(StatusTable)[] = {
73 .posOffset = { 0, 0, 0 },
74 .targetOffset = { -7, 33 },
76 .idleAnimations = N(DefaultAnims),
77 .defenseTable = N(DefenseTable),
79 .elementImmunityFlags = 0,
80 .projectileTargetOffset = { 2, -10 },
85 .posOffset = { 0, 0, 0 },
86 .targetOffset = { 0, 24 },
88 .idleAnimations = N(DefaultAnims),
89 .defenseTable = N(DefenseTable),
91 .elementImmunityFlags = 0,
92 .projectileTargetOffset = { -1, -5 },
97 .posOffset = { 0, 0, 0 },
98 .targetOffset = { 0, 24 },
100 .idleAnimations = N(DefaultAnims),
101 .defenseTable = N(DefenseTable),
103 .elementImmunityFlags = 0,
104 .projectileTargetOffset = { -1, -5 },
108 .index = PRT_SWARM_3,
109 .posOffset = { 0, 0, 0 },
110 .targetOffset = { 0, 24 },
112 .idleAnimations = N(DefaultAnims),
113 .defenseTable = N(DefenseTable),
115 .elementImmunityFlags = 0,
116 .projectileTargetOffset = { -1, -5 },
120 .index = PRT_SWARM_4,
121 .posOffset = { 0, 0, 0 },
122 .targetOffset = { 0, 24 },
124 .idleAnimations = N(DefaultAnims),
125 .defenseTable = N(DefenseTable),
127 .elementImmunityFlags = 0,
128 .projectileTargetOffset = { -1, -5 },
132 .index = PRT_SWARM_5,
133 .posOffset = { 0, 0, 0 },
134 .targetOffset = { 0, 24 },
136 .idleAnimations = N(DefaultAnims),
137 .defenseTable = N(DefenseTable),
139 .elementImmunityFlags = 0,
140 .projectileTargetOffset = { -1, -5 },
146 .type = ACTOR_TYPE_BZZAP,
147 .level = ACTOR_LEVEL_BZZAP,
150 .partsData = N(ActorParts),
151 .initScript = &N(EVS_Init),
152 .statusTable = N(StatusTable),
155 .hurricaneChance = 95,
157 .upAndAwayChance = 95,
159 .powerBounceChance = 90,
162 .healthBarOffset = { 0, 0 },
163 .statusIconOffset = { -10, 20 },
164 .statusTextOffset = { 10, 20 },
169API_CALLABLE(N(AddVecXZ)) {
170 Bytecode* args = script->ptrReadPos;
176 f32 outX = prevX + (length *
cos_deg(yaw));
177 f32 outZ = prevZ - (length *
sin_deg(yaw));
203 Call(N(SetAbsoluteStatusOffsets), -20, 20, 10, 27)
207 Call(N(SetAbsoluteStatusOffsets), -16, 22, 4, 22)
443 Call(SetBattleCamDist, 400)
444 Call(SetBattleCamOffsetY, 30)
446 Call(MoveBattleCamOver, 60)
498 Exec(N(EVS_SummonSwarmPart))
501 Exec(N(EVS_SummonSwarmPart))
504 Exec(N(EVS_SummonSwarmPart))
507 Exec(N(EVS_SummonSwarmPart))
#define STATUS_FLAGS_IMMOBILIZED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
@ EVENT_BEGIN_FIRST_STRIKE
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
@ ACTOR_PART_FLAG_INVISIBLE
@ DAMAGE_TYPE_TRIGGER_LUCKY
s32 evt_get_variable(Evt *script, Bytecode var)
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
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 PlaySound(Evt *script, b32 isInitialCall)
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus StopSound(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 End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#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 IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
#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 IsThreadRunning(TID, OUTVAR)
Sets OUTVAR to TRUE/FALSE depending on whether a thread with the given ID exists (i....
#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 DMG_STATUS_KEY(typeFlag, duration, chance)
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
#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 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.