5#include "sprite/npc/Pokey.h"
7#define NAMESPACE A(pokey)
21 AVAR_IN_CantSummon = 1,
28 AVAR_Anim_BurnHurt = 6,
29 AVAR_Anim_BurnStill = 7,
33 AVAL_Generation_First = 0,
34 AVAL_Generation_Second = 1,
35 AVAL_Generation_Last = 2,
46extern s32 N(FourPartAnims)[];
47extern s32 N(ThrownPartAnims)[];
52extern EvtScript N(EVS_FindValidSummonPosition);
54extern EvtScript N(EVS_Attack_SinglePartLeap);
55extern EvtScript N(EVS_Pokey_SpinSmashHit);
61s32 N(DefenseTable)[] = {
66s32 N(StatusTable)[] = {
95 .posOffset = { 0, 0, 0 },
96 .targetOffset = { 0, 20 },
98 .idleAnimations = N(FourPartAnims),
99 .defenseTable = N(DefenseTable),
101 .elementImmunityFlags = 0,
102 .projectileTargetOffset = { 0, 0 },
107 .posOffset = { 0, 0, 0 },
108 .targetOffset = { 0, 72 },
110 .idleAnimations = NULL,
111 .defenseTable = N(DefenseTable),
113 .elementImmunityFlags = 0,
114 .projectileTargetOffset = { 0, -8 },
119 .posOffset = { 0, 0, 0 },
120 .targetOffset = { 0, 54 },
122 .idleAnimations = NULL,
123 .defenseTable = N(DefenseTable),
125 .elementImmunityFlags = 0,
126 .projectileTargetOffset = { 0, -8 },
131 .posOffset = { 0, 0, 0 },
132 .targetOffset = { 0, 36 },
134 .idleAnimations = NULL,
135 .defenseTable = N(DefenseTable),
137 .elementImmunityFlags = 0,
138 .projectileTargetOffset = { 0, -8 },
143 .posOffset = { 0, 0, 0 },
144 .targetOffset = { 0, 16 },
146 .idleAnimations = NULL,
147 .defenseTable = N(DefenseTable),
149 .elementImmunityFlags = 0,
150 .projectileTargetOffset = { 0, -8 },
154 .index = PRT_PROJECTILE,
155 .posOffset = { 0, 0, 0 },
156 .targetOffset = { 0, 0 },
158 .idleAnimations = N(ThrownPartAnims),
159 .defenseTable = N(DefenseTable),
161 .elementImmunityFlags = 0,
162 .projectileTargetOffset = { 0, 0 },
168 .type = ACTOR_TYPE_POKEY,
169 .level = ACTOR_LEVEL_POKEY,
172 .partsData = N(ActorParts),
173 .initScript = &N(EVS_Init),
174 .statusTable = N(StatusTable),
177 .hurricaneChance = 85,
179 .upAndAwayChance = 95,
181 .powerBounceChance = 100,
184 .healthBarOffset = { 0, 0 },
185 .statusIconOffset = { -15, 75 },
186 .statusTextOffset = { 10, 65 },
189s32 N(FourPartAnims)[] = {
200s32 N(ThreePartAnims)[] = {
211s32 N(TwoPartAnims)[] = {
222s32 N(OnePartAnims)[] = {
233s32 N(ThrownPartAnims)[] = {
242 Call(SetActorVar,
ACTOR_SELF, AVAR_Generation, AVAL_Generation_First)
250 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup3)
252 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt4)
253 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill4)
662 Call(InitTargetIterator)
688 #define LBL_NO_SUMMON 123
691 ExecWait(N(EVS_Attack_SinglePartLeap))
700 ExecWait(N(EVS_FindValidSummonPosition))
704 ExecWait(N(EVS_CountSummonerPokeys))
739 Call(MoveBattleCamOver, 1)
753 Call(SetAnimation,
ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile)
812 Call(SetAnimation,
ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile)
825 Call(SetAnimation,
ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile)
854EvtScript N(EVS_FindValidSummonPosition) = {
870 Call(InitTargetIterator)
911Vec3i N(SummonPos) = { 400, -100, 0 };
923 Call(MoveBattleCamOver, 30)
980 Call(SummonEnemy,
Ref(N(SummonFormation)), FALSE)
989 Call(SetAnimation,
LVarB, 1, ANIM_Pokey_Hurt4)
993 Call(JumpToGoal,
LVarB, 20, FALSE, TRUE, FALSE)
996 Call(SetAnimation,
LVarB, 1, ANIM_Pokey_Idle4)
1004 CaseEq(AVAL_Generation_First)
1005 Call(SetActorVar,
LVarB, AVAR_Generation, AVAL_Generation_Second)
1006 CaseEq(AVAL_Generation_Second)
1007 Call(SetActorVar,
LVarB, AVAR_Generation, AVAL_Generation_Last)
1010 Call(MoveBattleCamOver, 20)
1039EvtScript N(EVS_Attack_SinglePartLeap) = {
1199#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
1206 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle3)
1209 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup2)
1210 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw2)
1211 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt3)
1212 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill3)
1221 Call(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45)
1223 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle2)
1226 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup1)
1227 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw1)
1228 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt2)
1229 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill2)
1238 Call(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25)
1240 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle1)
1243 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt1)
1244 Call(SetActorVar,
ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill1)
1253 Call(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5)
1321 Call(InitTargetIterator)
1379 Call(SetAnimation,
ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile)
#define STATUS_FLAGS_IMMOBILIZED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_ALT_SPIKY
Additional spiky quality associated with Pokeys and Spinies.
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ TARGET_FLAG_PRIMARY_ONLY
@ TARGET_FLAG_ALLOW_TARGET_ONLY
@ SOUND_POKEY_LEAN_FORWARD
@ SOUND_POKEY_EMERGE_FROM_GROUND
@ BTL_RUMBLE_PLAYER_HEAVY
@ ACTOR_FLAG_TARGET_ONLY
Battle ends even if undefeated. No turn.
@ EVENT_SPIN_SMASH_LAUNCH_HIT
@ EVENT_SPIN_SMASH_LAUNCH_DEATH
@ ACTOR_PART_FLAG_PRIMARY_TARGET
@ 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_HopToPos
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
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 DivF(VAR, FLOAT_VALUE)
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define AddF(VAR, FLOAT_VALUE)
#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 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 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 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 Div(VAR, INT_VALUE)
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
#define MulF(VAR, FLOAT_VALUE)
#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 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.
#define ACTOR_BY_POS(_name, _pos, _priority, args...)