5#include "sprite/npc/KoopaTroopa.h"
7#define NAMESPACE A(koopa_troopa)
9extern s32 N(DefaultAnims)[];
21 AVAR_FlippedTurns = 9,
28s32 N(NormalDefense)[] = {
37s32 N(FlippedDefense)[] = {
42s32 N(StatusTable)[] = {
71 .posOffset = { 0, 0, 0 },
72 .targetOffset = { -2, 36 },
74 .idleAnimations = N(DefaultAnims),
75 .defenseTable = N(NormalDefense),
77 .elementImmunityFlags = 0,
78 .projectileTargetOffset = { 0, -7 },
84 .type = ACTOR_TYPE_KOOPA_TROOPA,
85 .level = ACTOR_LEVEL_KOOPA_TROOPA,
88 .partsData = N(ActorParts),
89 .initScript = &N(EVS_Init),
90 .statusTable = N(StatusTable),
93 .hurricaneChance = 90,
95 .upAndAwayChance = 95,
97 .powerBounceChance = 100,
100 .healthBarOffset = { 0, 0 },
101 .statusIconOffset = { -15, 32 },
102 .statusTextOffset = { 5, 32 },
105s32 N(DefaultAnims)[] = {
118s32 N(ShuffleAnims)[] = {
131s32 N(FlippedAnims)[] = {
161 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
165 Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32)
170 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
184 ExecWait(N(EVS_UpdateTargetOffsets))
212 ExecWait(N(EVS_UpdateTargetOffsets))
240 ExecWait(N(EVS_UpdateTargetOffsets))
256s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 };
329 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle)
360 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit)
457 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin)
478 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle)
512 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellEnter)
524 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin)
542 Call(SetBattleCamDist, 300)
543 Call(SetBattleCamOffsetY, 20)
544 Call(MoveBattleCamOver, 10)
547 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit)
555 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic1)
557 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic2)
607 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit)
#define STATUS_FLAGS_IMMOBILIZED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_FLIPABLE
Actor can be flipped; triggered by jump and quake attacks.
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ BTL_CAM_ACTOR_TARGET_MIDPOINT
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ 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)
#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 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 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 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 ExecWait(EVT_SOURCE)
Launches a new child thread.
#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.