3#include "sprite/npc/ParaTroopa.h"
4#include "sprite/npc/KoopaTroopa.h"
7#define NAMESPACE A(dark_paratroopa)
12extern EvtScript N(EVS_HandleEvent_Flying);
13extern EvtScript N(EVS_HandlePhase_Flying);
22extern s32 N(KoopaAnims)[];
23extern s32 N(FlyingAnims)[];
24extern s32 N(WingAnims)[];
33 AVAR_TriggeredFall = 0,
34 AVAR_HasWhirlwind = 1,
36 AVAL_State_Normal = 0,
38 AVAL_State_ToppledNormal = 2,
39 AVAL_State_ToppledHyper = 3,
48#define SWEAT_DECOR_IDX 0
49#define WHIRLWIND_DECOR_IDX 1
51s32 N(UprightDefenseTable)[] = {
60s32 N(defenseTable2)[] = {
65s32 N(ToppledDefenseTable)[] = {
70s32 N(StatusTable)[] = {
95s32 N(FlyingStatusTable)[] = {
124 .posOffset = { 0, 0, 0 },
125 .targetOffset = { -2, 36 },
127 .idleAnimations = N(KoopaAnims),
128 .defenseTable = N(UprightDefenseTable),
130 .elementImmunityFlags = 0,
131 .projectileTargetOffset = { 0, -7 },
136 .posOffset = { 0, 0, 0 },
137 .targetOffset = { -4, 36 },
139 .idleAnimations = N(FlyingAnims),
140 .defenseTable = N(defenseTable2),
142 .elementImmunityFlags = 0,
143 .projectileTargetOffset = { 2, -14 },
148 .posOffset = { 0, 0, 0 },
149 .targetOffset = { 0, 32 },
151 .idleAnimations = N(WingAnims),
152 .defenseTable = N(UprightDefenseTable),
154 .elementImmunityFlags = 0,
155 .projectileTargetOffset = { 0, -10 },
161 .type = ACTOR_TYPE_DARK_PARATROOPA,
162 .level = ACTOR_LEVEL_DARK_PARATROOPA,
165 .partsData = N(ActorParts),
166 .initScript = &N(EVS_Init_Flying),
167 .statusTable = N(FlyingStatusTable),
170 .hurricaneChance = 80,
172 .upAndAwayChance = 95,
174 .powerBounceChance = 85,
177 .healthBarOffset = { 0, 0 },
178 .statusIconOffset = { -10, 29 },
179 .statusTextOffset = { 8, 30 },
182s32 N(FlyingAnims)[] = {
195s32 N(FlyingShuffleAnims)[] = {
208s32 N(WingAnims)[] = {
244 Call(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28)
248 Call(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30)
261 ExecWait(N(EVS_UpdateOffsets_Flying))
278 ExecWait(N(EVS_UpdateOffsets_Flying))
295 ExecWait(N(EVS_UpdateOffsets_Flying))
308 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run)
312 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle)
460 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run)
474 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup)
488 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive)
513 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt)
519 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt)
543 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup)
554 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive)
565 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellHit)
579 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle)
604 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt)
613 Call(N(StartRumbleWithParams), 128, 7)
644 Call(N(StartRumbleWithParams), 150, 7)
655 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle)
673s32 N(KoopaAnims)[] = {
686s32 N(ShuffleAnims)[] = {
699s32 N(HyperAnims)[] = {
712s32 N(HyperShuffleAnims)[] = {
725s32 N(ToppledAnims)[] = {
748 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
762 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
766 Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32)
773 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
788 ExecWait(N(EVS_UpdateOffsets_Koopa))
830 ExecWait(N(EVS_UpdateOffsets_Koopa))
872 ExecWait(N(EVS_UpdateOffsets_Koopa))
913 CaseEq(AVAL_State_ToppledNormal)
914 CaseEq(AVAL_State_ToppledHyper)
921s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 };
971 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal)
973 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper)
981 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt)
1005 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle)
1039 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
1155 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
1160 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter)
1172 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
1188 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
1196 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1)
1198 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2)
1204 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
1213 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
1217 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle)
1247 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
1253 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle)
1282 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run)
1285 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
1287 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter)
1299 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
1309 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
1320 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
1324 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
1350 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
1359 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
1391 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle)
1416 CaseEq(AVAL_State_ToppledNormal)
1419 CaseEq(AVAL_State_ToppledHyper)
1437 CaseEq(AVAL_State_Normal)
#define WHIRLWIND_DECOR_IDX
#define STATUS_FLAGS_IMMOBILIZED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_GROUNDABLE
Actor can be knocked down from flight; triggered by jump attacks.
@ ACTOR_EVENT_FLAG_FLIPABLE
Actor can be flipped; triggered by jump and quake attacks.
@ ACTOR_DECORATION_WHIRLWIND
@ ENCOUNTER_TRIGGER_HAMMER
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ BTL_CAM_ACTOR_TARGET_MIDPOINT
@ SOUND_PARAGOOMBA_PREDIVE
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
@ ACTOR_FLAG_TYPE_CHANGED
Indicates actors type has changed, triggers recheck for if HP bar should be shown based on tattle sta...
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
@ EVENT_BEGIN_FIRST_STRIKE
@ 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_INVISIBLE
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
@ 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 ShakeCam(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 IfGe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR >= RVAR.
#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 UseBuf(INT_PTR)
Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
#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 BufRead1(VAR)
Consumes the next s32 from the buffer and stores it in the given variable.
#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 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 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.