5#include "sprite/npc/KoopaTroopa.h"
6#include "sprite/npc/ParaTroopa.h"
8#define NAMESPACE A(paratroopa)
10extern s32 N(DownedAnims)[];
11extern s32 N(FlyingAnims)[];
12extern s32 N(WingAnims)[];
16extern EvtScript N(EVS_Flying_HandleEvent);
22extern EvtScript N(EVS_Downed_HandleEvent);
36 AVAR_FlippedTurns = 9,
44s32 N(DownedDefense)[] = {
53s32 N(FlyingDefense)[] = {
58s32 N(FlippedDefense)[] = {
63s32 N(DownedStatusTable)[] = {
88s32 N(FlyingStatusTable)[] = {
117 .posOffset = { 0, 0, 0 },
118 .targetOffset = { -2, 36 },
120 .idleAnimations = N(DownedAnims),
121 .defenseTable = N(DownedDefense),
123 .elementImmunityFlags = 0,
124 .projectileTargetOffset = { 0, -7 },
129 .posOffset = { 0, 0, 0 },
130 .targetOffset = { -4, 36 },
132 .idleAnimations = N(FlyingAnims),
133 .defenseTable = N(FlyingDefense),
135 .elementImmunityFlags = 0,
136 .projectileTargetOffset = { 2, -14 },
140 .index = PRT_DUMMY_WINGS,
141 .posOffset = { 0, 0, 0 },
142 .targetOffset = { 0, 32 },
144 .idleAnimations = N(WingAnims),
145 .defenseTable = N(DownedDefense),
147 .elementImmunityFlags = 0,
148 .projectileTargetOffset = { 0, -10 },
154 .type = ACTOR_TYPE_PARATROOPA,
155 .level = ACTOR_LEVEL_PARATROOPA,
158 .partsData = N(ActorParts),
159 .initScript = &N(EVS_Flying_Init),
160 .statusTable = N(FlyingStatusTable),
163 .hurricaneChance = 100,
165 .upAndAwayChance = 95,
167 .powerBounceChance = 90,
170 .healthBarOffset = { 0, 0 },
171 .statusIconOffset = { -10, 29 },
172 .statusTextOffset = { 8, 30 },
175s32 N(FlyingAnims)[] = {
188s32 N(FlyingShuffleAnims)[] = {
201s32 N(WingAnims)[] = {
230EvtScript N(EVS_Flying_UpdateTargetOffsets) = {
234 Call(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28)
238 Call(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30)
251 ExecWait(N(EVS_Flying_UpdateTargetOffsets))
268 ExecWait(N(EVS_Flying_UpdateTargetOffsets))
285 ExecWait(N(EVS_Flying_UpdateTargetOffsets))
464 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup)
478 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive)
533 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup)
544 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive)
555 Call(SetAnimation,
ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellHit)
603 Call(N(StartRumbleWithParams), 128, 7)
634 Call(N(StartRumbleWithParams), 150, 7)
664s32 N(DownedAnims)[] = {
677s32 N(DownedShuffleAnims)[] = {
690s32 N(DownedFlippedAnims)[] = {
712EvtScript N(EVS_Downed_UpdateTargetOffsets) = {
718 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
722 Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32)
727 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
741 ExecWait(N(EVS_Downed_UpdateTargetOffsets))
769 ExecWait(N(EVS_Downed_UpdateTargetOffsets))
797 ExecWait(N(EVS_Downed_UpdateTargetOffsets))
813s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 };
886 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle)
917 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit)
1014 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin)
1035 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle)
1053 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle)
1069 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellEnter)
1081 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin)
1099 Call(SetBattleCamDist, 300)
1100 Call(SetBattleCamOffsetY, 20)
1101 Call(MoveBattleCamOver, 10)
1104 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit)
1112 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic1)
1114 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic2)
1120 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic)
1129 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic)
1133 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle)
1164 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit)
1170 Call(SetAnimation,
ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle)
#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.
@ 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_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 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 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 EndChildThread
Marks the end of a child thread block.
#define Sub(VAR, INT_VALUE)
#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 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 ChildThread
Marks the start of a child thread block.
#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.