5#include "sprite/npc/BattleBombette.h"
9#define NAMESPACE battle_partner_bombette
18extern EvtScript N(EVS_Attack_FirstStrike);
38API_CALLABLE(N(PlayExplosionFX)) {
47 fx_smoke_ring(0, x, y, z);
50 switch (selectedMoveID) {
52 if (script->varTable[10] > 0) {
53 fx_explosion(1, x, y + 20, z);
55 fx_explosion(0, x, y + 20, z);
60 if (script->varTable[10] > 0) {
61 fx_explosion(1, x, y + 20, z);
63 fx_explosion(0, x, y + 20, z);
68 if (script->varTable[10] > 0) {
69 fx_explosion(2, x, y + 20, z);
71 fx_explosion(1, x, y + 20, z);
76 fx_explosion(0, x, y + 20, z);
84API_CALLABLE(N(SlowDown)) {
105 partnerActorMovement->
speed /= 1.5;
111 if (partnerActorMovement->
speed < 1.0) {
118API_CALLABLE(N(GetBombDamage)) {
119 Bytecode* args = script->ptrReadPos;
127 if (mashResult <= 35) {
129 }
else if (mashResult <= 60) {
131 }
else if (mashResult <= 80) {
133 }
else if (mashResult <= 99) {
140 if (mashResult <= 35) {
142 }
else if (mashResult <= 60) {
144 }
else if (mashResult <= 80) {
146 }
else if (mashResult <= 99) {
153 if (mashResult <= 35) {
155 }
else if (mashResult <= 60) {
157 }
else if (mashResult <= 80) {
159 }
else if (mashResult <= 99) {
167 if (mashResult > 99) {
168 script->varTable[0] = TRUE;
170 script->varTable[0] = FALSE;
173 script->varTable[15] = damage;
178API_CALLABLE(N(GetPowerBombDamage)) {
179 Bytecode* args = script->ptrReadPos;
187 if (mashResult <= 35) {
189 }
else if (mashResult <= 60) {
191 }
else if (mashResult <= 80) {
193 }
else if (mashResult <= 99) {
200 if (mashResult <= 35) {
202 }
else if (mashResult <= 60) {
204 }
else if (mashResult <= 80) {
206 }
else if (mashResult <= 99) {
214 if (mashResult > 99) {
215 script->varTable[0] = TRUE;
217 script->varTable[0] = FALSE;
220 script->varTable[15] = damage;
225API_CALLABLE(N(GetMegaBombDamage)) {
226 Bytecode* args = script->ptrReadPos;
234 if (mashResult <= 35) {
236 }
else if (mashResult <= 60) {
238 }
else if (mashResult <= 80) {
240 }
else if (mashResult <= 99) {
248 if (mashResult > 99) {
249 script->varTable[0] = TRUE;
251 script->varTable[0] = FALSE;
254 script->varTable[15] = damage;
259s32 N(DefaultAnims)[] = {
270s32 N(DefenseTable)[] = {
275s32 N(StatusTable)[] = {
304 .posOffset = { 0, 0, 0 },
305 .targetOffset = { 9, 20 },
307 .idleAnimations = N(DefaultAnims),
308 .defenseTable = N(DefenseTable),
310 .elementImmunityFlags = 0,
311 .projectileTargetOffset = { 0, 0 },
317 .type = ACTOR_TYPE_BOMBETTE,
318 .level = ACTOR_LEVEL_BOMBETTE,
321 .partsData = N(ActorParts),
322 .initScript = &N(EVS_Init),
323 .statusTable = N(StatusTable),
326 .hurricaneChance = 0,
328 .upAndAwayChance = 0,
330 .powerBounceChance = 80,
333 .healthBarOffset = { 0, 0 },
334 .statusIconOffset = { -10, 20 },
335 .statusTextOffset = { 10, 20 },
354 Call(CloseActionCommandInfo)
441 Call(SetJumpAnimations,
ACTOR_PARTNER, 0, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt)
626 Call(ShowActionHud, TRUE)
631 Call(LoadStarPowerScript)
695 Call(PartnerYieldTurn)
697 Call(MoveBattleCamOver, 10)
737 Call(PartnerYieldTurn)
809 Call(action_command_body_slam_init)
810 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
813 Call(InitTargetIterator)
825 Call(MoveBattleCamOver, 65)
827 Call(action_command_body_slam_start, 0, 92, 3, 0)
878 Call(action_command_body_slam_start, 0, 92, 3, 0)
900 Call(action_command_body_slam_start, 0, 92, 3, 0)
935 Call(CloseActionCommandInfo)
1013 ExecWait(N(EVS_ReturnHome_Success))
1022 Call(action_command_bomb_init)
1029 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1031 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1033 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1039 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1041 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1044 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1051 Call(InitTargetIterator)
1055 Call(InitTargetIterator)
1059 Call(InitTargetIterator)
1063 Call(MoveBattleCamOver, 60 *
DT)
1067 Call(action_command_bomb_start, 0, 57 *
DT, 3, 0)
1069 Call(action_command_bomb_start, 0, 73 *
DT - 1, 3, 1)
1071 Call(action_command_bomb_start, 0, 87 *
DT, 3, 2)
1121 Call(MoveBattleCamOver, 8)
1225 Call(N(PlayExplosionFX), 88, 33, 5)
1227 Call(N(PlayExplosionFX), 18, 73, 5)
1229 Call(N(PlayExplosionFX), 120, 19, 5)
1300 Call(MoveBattleCamOver, 10)
1326 Call(PartnerYieldTurn)
1345 Call(InitTargetIterator)
1354 Call(MoveBattleCamOver, 1)
1371 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