3#include "sprite/npc/KoopaTroopa.h"
6#define NAMESPACE A(dark_koopa)
13extern s32 N(KoopaAnims)[];
20 AVAR_HasWhirlwind = 1,
22 AVAL_State_Normal = 0,
24 AVAL_State_ToppledNormal = 2,
25 AVAL_State_ToppledHyper = 3,
33#define SWEAT_DECOR_IDX 0
34#define WHIRLWIND_DECOR_IDX 1
36s32 N(UprightDefenseTable)[] = {
45s32 N(ToppledDefenseTable)[] = {
50s32 N(StatusTable)[] = {
79 .posOffset = { 0, 0, 0 },
80 .targetOffset = { -2, 36 },
82 .idleAnimations = N(KoopaAnims),
83 .defenseTable = N(UprightDefenseTable),
85 .elementImmunityFlags = 0,
86 .projectileTargetOffset = { 0, -7 },
92 .type = ACTOR_TYPE_DARK_KOOPA,
93 .level = ACTOR_LEVEL_DARK_KOOPA,
96 .partsData = N(ActorParts),
97 .initScript = &N(EVS_Init),
98 .statusTable = N(StatusTable),
101 .hurricaneChance = 75,
103 .upAndAwayChance = 95,
105 .powerBounceChance = 90,
108 .healthBarOffset = { 0, 0 },
109 .statusIconOffset = { -15, 32 },
110 .statusTextOffset = { 5, 32 },
113s32 N(KoopaAnims)[] = {
126s32 N(ShuffleAnims)[] = {
139s32 N(HyperAnims)[] = {
152s32 N(HyperShuffleAnims)[] = {
165s32 N(ToppledAnims)[] = {
188 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
195#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
204 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
208 Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32)
215 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
355 CaseEq(AVAL_State_ToppledNormal)
356 CaseEq(AVAL_State_ToppledHyper)
363s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 };
413 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal)
415 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper)
423 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt)
447 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle)
481 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
597 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
602 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter)
614 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
630 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
638 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1)
640 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2)
646 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
655 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
659 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle)
689 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
695 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle)
724 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run)
727 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
729 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter)
741 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin)
751 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
762 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic)
766 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
792 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit)
801 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble)
833 Call(SetAnimation,
ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle)
858 CaseEq(AVAL_State_ToppledNormal)
861 CaseEq(AVAL_State_ToppledHyper)
#define WHIRLWIND_DECOR_IDX
#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.
@ ACTOR_DECORATION_WHIRLWIND
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ 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 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 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 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 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.