3#include "sprite/npc/BattleWatt.h"
6#define NAMESPACE A(watt_clone)
13s32 N(DefaultAnims)[] = {
26s32 N(DefenseTable)[] = {
32s32 N(StatusTable)[] = {
61 .posOffset = { 0, 0, 0 },
62 .targetOffset = { -1, 20 },
64 .idleAnimations = N(DefaultAnims),
65 .defenseTable = N(DefenseTable),
67 .elementImmunityFlags = 0,
68 .projectileTargetOffset = { 0, -8 },
73 .posOffset = { 0, 50, 0 },
74 .targetOffset = { -1, -30 },
76 .idleAnimations = NULL,
77 .defenseTable = N(DefenseTable),
79 .elementImmunityFlags = 0,
80 .projectileTargetOffset = { 0, -8 },
86 .type = ACTOR_TYPE_GHOST_WATT,
87 .level = ACTOR_LEVEL_GHOST_WATT,
90 .partsData = N(ActorParts),
91 .initScript = &N(EVS_Init),
92 .statusTable = N(StatusTable),
95 .hurricaneChance = 70,
97 .upAndAwayChance = 95,
99 .powerBounceChance = 90,
102 .healthBarOffset = { 0, 0 },
103 .statusIconOffset = { -10, 20 },
104 .statusTextOffset = { 10, 20 },
115API_CALLABLE(N(WattFXUpdate)) {
122 wattEffectData =
heap_malloc(
sizeof(*wattEffectData));
123 actor->
state.varTablePtr[2] = wattEffectData;
134 wattEffectData = state->varTablePtr[2];
148 if (wattEffectData->
effect1 == NULL) {
152 if (wattEffectData->
effect2 != NULL) {
154 wattEffectData->
effect2 = NULL;
161 if (wattEffectData->
effect1 != NULL) {
163 wattEffectData->
effect1 = NULL;
165 if (wattEffectData->
effect2 == NULL) {
175 if (wattEffectData->
effect1 != NULL) {
177 wattEffectData->
effect1 = NULL;
179 if (wattEffectData->
effect2 != NULL) {
181 wattEffectData->
effect2 = NULL;
185 if (wattEffectData->
effect1 != NULL) {
187 wattEffectData->
effect1 = NULL;
189 if (wattEffectData->
effect2 != NULL) {
191 wattEffectData->
effect2 = NULL;
202 Call(N(WattFXUpdate))
207API_CALLABLE(N(WattFXRemove)) {
212 if (wattEffectData->
effect1 != NULL) {
216 if (wattEffectData->
effect2 != NULL) {
223API_CALLABLE(N(WattFXSetBouncing)) {
224 Bytecode* args = script->ptrReadPos;
231API_CALLABLE(N(WattFXSetActive)) {
232 Bytecode* args = script->ptrReadPos;
239API_CALLABLE(N(WattFXSetEffect)) {
240 Bytecode* args = script->ptrReadPos;
249 Call(N(WattFXSetBouncing), 0)
250 Call(N(WattFXSetActive), 1)
251 Call(N(WattFXSetEffect), 0)
270 Call(N(WattFXRemove))
281 Call(N(WattFXRemove))
298 Call(N(WattFXRemove))
329 Call(N(WattFXSetBouncing), 1)
335#include "common/UnkBackgroundFunc3.inc.c"
344 Call(SetBattleCamDist, 350)
345 Call(SetBattleCamOffsetY, 40)
346 Call(MoveBattleCamOver, 80)
351 Call(N(WattFXSetEffect), 1)
355 Call(N(WattFXSetEffect), 0)
357 Call(N(WattFXSetBouncing), 0)
378 Call(N(WattFXSetActive), 1)
379 Call(N(WattFXSetBouncing), 1)
391 Call(N(WattFXSetActive), 0)
393 Call(AddBattleCamDist, -75)
407 Call(N(UnkBackgroundFunc3))
409 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_StrainBigger)
420 Call(AddBattleCamDist, 75)
421 Call(MoveBattleCamOver, 5)
424 Call(N(SetBackgroundAlpha), 0)
454 Call(N(WattFXSetActive), 1)
455 Call(N(WattFXSetBouncing), 1)
struct StaticStatusFXData * staticStatus
@ FX_INSTANCE_FLAG_DISMISS
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_PAL_ADJUST_WATT_IDLE
@ ACTOR_EVENT_FLAG_ELECTRIFIED
Player takes shock damage upon contact.
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
@ ACTOR_PART_FLAG_INVISIBLE
@ DAMAGE_TYPE_IGNORE_DEFENSE
@ DAMAGE_TYPE_TRIGGER_LUCKY
s32 evt_get_variable(Evt *script, Bytecode var)
Actor * get_actor(s32 actorID)
void * heap_malloc(s32 size)
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
#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 SetPriority(PRIORITY)
Sets the current thread's priority. Higher-priority threads execute before lower-priority threads on ...
#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 NPC_DISPOSE_POS_Y
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
#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 Wait(NUM_FRAMES)
Blocks for the given number of frames.
#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...)