4#include "sprite/npc/Duplighost.h"
6#define NAMESPACE A(duplighost)
10#define WATT(x) A( watt_clone_##x )
26 AVAR_Copy_ParentActorID = 0,
27 AVAR_Copy_PartnerLevel = 1,
28 AVAR_Kooper_Toppled = 3,
29 AVAR_Kooper_ToppleTurns = 4,
31 AVAL_State_ReadyToCopy = 0,
32 AVAL_State_CopiedPartner = 1,
33 AVAL_State_ReadyToTackle = 2,
34 AVAL_State_WaitToTackle = 3,
41s32 N(DefaultAnims)[] = {
54s32 N(FlailingAnims)[] = {
64s32 N(DefenseTable)[] = {
69s32 N(StatusTable)[] = {
98 .posOffset = { 0, 0, 0 },
99 .targetOffset = { -5, 25 },
101 .idleAnimations = N(DefaultAnims),
102 .defenseTable = N(DefenseTable),
104 .elementImmunityFlags = 0,
105 .projectileTargetOffset = { -2, -10 },
111 .type = ACTOR_TYPE_DUPLIGHOST,
112 .level = ACTOR_LEVEL_DUPLIGHOST,
115 .partsData = N(ActorParts),
116 .initScript = &N(EVS_Init),
117 .statusTable = N(StatusTable),
120 .hurricaneChance = 70,
122 .upAndAwayChance = 95,
124 .powerBounceChance = 90,
127 .healthBarOffset = { 0, 0 },
128 .statusIconOffset = { -10, 20 },
129 .statusTextOffset = { 10, 20 },
150 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_ReadyToTackle)
382 Call(SetActorVar,
LVarA, AVAR_State, AVAL_State_ReadyToTackle)
384 Call(SetIdleAnimations,
LVarA, PRT_MAIN,
Ref(N(FlailingAnims)))
385 Call(SetAnimation,
LVarA, 1, ANIM_Duplighost_Anim0A)
394 Call(JumpToGoal,
LVarA, 15, FALSE, TRUE, FALSE)
397 Call(JumpToGoal,
LVarA, 10, FALSE, TRUE, FALSE)
399 Call(JumpToGoal,
LVarA, 5, FALSE, TRUE, FALSE)
403 Call(SetIdleAnimations,
LVarA, PRT_MAIN,
Ref(N(DefaultAnims)))
404 Call(SetAnimation,
LVarA, 1, ANIM_Duplighost_Anim02)
451 Call(SetActorVar,
LVarA, AVAR_State, AVAL_State_WaitToTackle)
453 Call(SetIdleAnimations,
LVarA, PRT_MAIN,
Ref(N(FlailingAnims)))
454 Call(SetAnimation,
LVarA, 1, ANIM_Duplighost_Anim0A)
462 Call(JumpToGoal,
LVarA, 15, FALSE, TRUE, FALSE)
465 Call(JumpToGoal,
LVarA, 10, FALSE, TRUE, FALSE)
468 Call(JumpToGoal,
LVarA, 5, FALSE, TRUE, FALSE)
472 Call(SetIdleAnimations,
LVarA, PRT_MAIN,
Ref(N(RunAnims)))
473 Call(SetAnimation,
LVarA, 1, ANIM_Duplighost_Anim04)
479 Call(SetAnimation,
LVarA, 1, ANIM_Duplighost_Anim02)
482 Call(SetIdleAnimations,
LVarA, PRT_MAIN,
Ref(N(DefaultAnims)))
549#define NAMESPACE A(duplighost)
551API_CALLABLE(N(GetPartnerAndLevel)) {
552 Bytecode* args = script->ptrReadPos;
559API_CALLABLE(N(AdjustFormationPriority)) {
566 formation =
A(GoombarioCloneFormation);
569 formation =
A(KooperCloneFormation);
572 formation =
A(BombetteCloneFormation);
575 formation =
A(ParakarryCloneFormation);
578 formation =
A(BowCloneFormation);
581 formation =
A(WattCloneFormation);
584 formation =
A(SushieCloneFormation);
587 formation =
A(LakilesterCloneFormation);
628 Call(SummonEnemy,
Ref(
A(GoombarioCloneFormation)), FALSE)
630 Call(SummonEnemy,
Ref(
A(KooperCloneFormation)), FALSE)
632 Call(SummonEnemy,
Ref(
A(BombetteCloneFormation)), FALSE)
634 Call(SummonEnemy,
Ref(
A(ParakarryCloneFormation)), FALSE)
636 Call(SummonEnemy,
Ref(
A(BowCloneFormation)), FALSE)
638 Call(SummonEnemy,
Ref(
A(WattCloneFormation)), FALSE)
640 Call(SummonEnemy,
Ref(
A(SushieCloneFormation)), FALSE)
642 Call(SummonEnemy,
Ref(
A(LakilesterCloneFormation)), FALSE)
671 Call(MoveBattleCamOver, 20)
688 Call(JumpToGoal,
LVarA, 10, FALSE, FALSE, FALSE)
696 Call(JumpToGoal,
LVarA, 20, FALSE, FALSE, FALSE)
707 Call(SetActorVar,
ACTOR_SELF, AVAR_State, AVAL_State_CopiedPartner)
717 CaseEq(AVAL_State_ReadyToCopy)
734 ExecWait(N(EVS_Attack_FlyingTackle))
738 ExecWait(N(EVS_Attack_FlyingTackle))
740 CaseEq(AVAL_State_CopiedPartner)
742 CaseEq(AVAL_State_ReadyToTackle)
743 ExecWait(N(EVS_Attack_FlyingTackle))
744 CaseEq(AVAL_State_WaitToTackle)
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
@ ACTOR_FLAG_NO_DMG_APPLY
Damage is not applied to actor HP.
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
@ ACTOR_PART_FLAG_INVISIBLE
@ DAMAGE_TYPE_TRIGGER_LUCKY
s32 evt_get_variable(Evt *script, Bytecode var)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Actor * get_actor(s32 actorID)
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 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 Goto(LABEL_ID)
Moves execution to the given label.
#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 SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
#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 NPC_DISPOSE_LOCATION
#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 BitwiseOrConst(VAR, CONST)
VAR |= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.
#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.
s32 priority
Actors with higher priority values take their turn first.
@ BTL_VAR_DuplighostCopyFlags
@ BTL_VAR_LastCopiedPartner
@ BTL_VAL_Duplighost_HasCopied