5#include "sprite/npc/BattleBombette.h"
9#define NAMESPACE battle_partner_bombette
18extern EvtScript N(EVS_Attack_FirstStrike);
38API_CALLABLE(N(PlayExplosionFX)) {
46 fx_smoke_ring(0, x, y, z);
49 switch (selectedMoveID) {
51 if (script->varTable[10] > 0) {
52 fx_explosion(1, x, y + 20, z);
54 fx_explosion(0, x, y + 20, z);
59 if (script->varTable[10] > 0) {
60 fx_explosion(1, x, y + 20, z);
62 fx_explosion(0, x, y + 20, z);
67 if (script->varTable[10] > 0) {
68 fx_explosion(2, x, y + 20, z);
70 fx_explosion(1, x, y + 20, z);
75 fx_explosion(0, x, y + 20, z);
83API_CALLABLE(N(SlowDown)) {
104 partnerActorMovement->
speed /= 1.5;
110 if (partnerActorMovement->
speed < 1.0) {
117API_CALLABLE(N(GetBombDamage)) {
118 Bytecode* args = script->ptrReadPos;
126 if (mashResult <= 35) {
128 }
else if (mashResult <= 60) {
130 }
else if (mashResult <= 80) {
132 }
else if (mashResult <= 99) {
139 if (mashResult <= 35) {
141 }
else if (mashResult <= 60) {
143 }
else if (mashResult <= 80) {
145 }
else if (mashResult <= 99) {
152 if (mashResult <= 35) {
154 }
else if (mashResult <= 60) {
156 }
else if (mashResult <= 80) {
158 }
else if (mashResult <= 99) {
166 if (mashResult > 99) {
167 script->varTable[0] =
true;
169 script->varTable[0] =
false;
172 script->varTable[15] = damage;
177API_CALLABLE(N(GetPowerBombDamage)) {
178 Bytecode* args = script->ptrReadPos;
186 if (mashResult <= 35) {
188 }
else if (mashResult <= 60) {
190 }
else if (mashResult <= 80) {
192 }
else if (mashResult <= 99) {
199 if (mashResult <= 35) {
201 }
else if (mashResult <= 60) {
203 }
else if (mashResult <= 80) {
205 }
else if (mashResult <= 99) {
213 if (mashResult > 99) {
214 script->varTable[0] =
true;
216 script->varTable[0] =
false;
219 script->varTable[15] = damage;
224API_CALLABLE(N(GetMegaBombDamage)) {
225 Bytecode* args = script->ptrReadPos;
233 if (mashResult <= 35) {
235 }
else if (mashResult <= 60) {
237 }
else if (mashResult <= 80) {
239 }
else if (mashResult <= 99) {
247 if (mashResult > 99) {
248 script->varTable[0] =
true;
250 script->varTable[0] =
false;
253 script->varTable[15] = damage;
258s32 N(DefaultAnims)[] = {
269s32 N(DefenseTable)[] = {
274s32 N(StatusTable)[] = {
303 .posOffset = { 0, 0, 0 },
304 .targetOffset = { 9, 20 },
306 .idleAnimations = N(DefaultAnims),
307 .defenseTable = N(DefenseTable),
309 .elementImmunityFlags = 0,
310 .projectileTargetOffset = { 0, 0 },
316 .type = ACTOR_TYPE_BOMBETTE,
317 .level = ACTOR_LEVEL_BOMBETTE,
320 .partsData = N(ActorParts),
321 .initScript = &N(EVS_Init),
322 .statusTable = N(StatusTable),
325 .hurricaneChance = 0,
327 .upAndAwayChance = 0,
329 .powerBounceChance = 80,
332 .healthBarOffset = { 0, 0 },
333 .statusIconOffset = { -10, 20 },
334 .statusTextOffset = { 10, 20 },
353 Call(InterruptActionCommand)
440 Call(SetJumpAnimations,
ACTOR_PARTNER, 0, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt)
625 Call(ShowActionHud,
true)
630 Call(LoadStarPowerScript)
694 Call(PartnerYieldTurn)
696 Call(MoveBattleCamOver, 10)
736 Call(PartnerYieldTurn)
808 Call(action_command_body_slam_init)
809 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
812 Call(InitTargetIterator)
824 Call(MoveBattleCamOver, 65)
934 Call(InterruptActionCommand)
1012 ExecWait(N(EVS_ReturnHome_Success))
1021 Call(action_command_bomb_init)
1028 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1030 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1032 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1038 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1040 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1043 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1050 Call(InitTargetIterator)
1054 Call(InitTargetIterator)
1058 Call(InitTargetIterator)
1062 Call(MoveBattleCamOver, 60 *
DT)
1120 Call(MoveBattleCamOver, 8)
1224 Call(N(PlayExplosionFX), 88, 33, 5)
1226 Call(N(PlayExplosionFX), 18, 73, 5)
1228 Call(N(PlayExplosionFX), 120, 19, 5)
1299 Call(MoveBattleCamOver, 10)
1325 Call(PartnerYieldTurn)
1344 Call(InitTargetIterator)
1353 Call(MoveBattleCamOver, 1)
1370 Call(MoveBattleCamOver, 8)
struct ActorBlueprint * actorBlueprint
@ ACTION_COMMAND_BODY_SLAM
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ BTL_MENU_TYPE_STAR_POWERS
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ HIT_RESULT_NICE_NO_DAMAGE
@ BTL_CAM_MIDPOINT_NORMAL
@ BTL_CAM_CLOSER_PARTNER_APPROACH
@ BTL_CAM_PARTNER_HIT_SPIKE
@ BTL_CAM_PARTNER_HIT_HAZARD
@ BTL_CAM_PARTNER_MISTAKE
@ SUPPRESS_EVENT_SPIKY_TOP
@ SUPPRESS_EVENT_ALT_SPIKY
@ SUPPRESS_EVENT_SPIKY_FRONT
@ SUPPRESS_EVENT_BURN_CONTACT
@ SOUND_BOMBETTE_BLAST_LV2
@ SOUND_BOMBETTE_BLAST_LV3
@ SOUND_LRAW_BOMBETTE_FUSE
@ SOUND_BOMBETTE_BLAST_LV1
@ SOUND_BOMBETTE_BODY_SLAM
@ DAMAGE_TYPE_MULTIPLE_POPUPS
s32 evt_get_variable(Evt *script, Bytecode var)
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
EvtScript EVS_Partner_Hit
EvtScript EVS_Partner_Recover
EvtScript EVS_Partner_Drop
EvtScript EVS_Partner_NoDamageHit
EvtScript EVS_Partner_BurnHit
EvtScript EVS_Partner_BombetteSpikeContact
EvtScript EVS_Partner_Celebrate
EvtScript EVS_RunAwayFail
EvtScript EVS_Partner_RunAway
void sfx_play_sound(s32 soundID)
ApiStatus StopSound(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 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 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 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 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 BreakLoop
Breaks out of the innermost loop.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define KillThread(TID)
Kills a thread by its thread ID.
#define BreakSwitch
Marks the end of a switch case.
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
#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 CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
#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.
struct Actor * partnerActor
BattleStatus gBattleStatus