8#include "sprite/npc/BattleParakarry.h"
10#define NAMESPACE battle_partner_parakarry
43static s32 D_8023BD74_unused;
44static s32 hudMarkers[7];
45static s32 D_8023BD94_unused;
46static s32 hudShimmers[6];
47static s32 D_8023BDB0_unused;
49static s32 hudTargetRotation;
50static s32 shellShotTimer;
52static s32 hudStickPosX;
53static s32 hudStickPosY;
75 script->functionTemp[0] = 0;
78 switch (
script->functionTemp[0]) {
157 state->
dist = 116.0f;
160 for (i = 0; i < 30; i++) {
176 for (i = 0; i < 30; i++) {
191 hudTargetRotation = 0;
201 script->functionTemp[0] = 1;
208 if (shellShotTimer != 0) {
210 if (shellShotTimer == 0) {
223 script->functionTemp[0] = 2;
228 script->functionTemp[0] = 3;
232 if (shellShotTimer == 0) {
237 script->functionTemp[0] = 3;
249 state->
vel = 0.0f - state->
vel;
254 state->
vel = 0.0f - state->
vel;
262 if (state->
vel >= 0.0f) {
297 if (
script->functionTemp[0] < 3) {
298 if (
script->functionTemp[0] > 0) {
311 if (hudStickPosX >= 51) {
322 hudTargetRotation -= 10;
323 hudTargetRotation =
clamp_angle(hudTargetRotation);
325 if (
script->functionTemp[0] >= 2) {
326 if (
script->functionTemp[0] < 3) {
342 hid = hudShimmers[i];
358 switch (
battleStatus->partnerActor->actorBlueprint->level) {
379 s32 airLiftChance =
targetActor->actorBlueprint->airLiftChance;
390 if (airLiftChance > 0) {
393 if (airLiftChance > 100) {
398 airLiftChance = airLiftChance * 150 / 100;
400 if (airLiftChance > 150) {
406 script->varTable[0] = airLiftChance;
422 script->functionTemp[0] = 0;
428 switch (
script->functionTemp[0]) {
435 script->functionTemp[0] = 1;
449 if (
parakarry->state.curPos.x > 240.0f) {
471 script->functionTemp[0] = 0;
474 switch (
script->functionTemp[0]) {
482 state->
speed = 48.0f;
483 script->functionTemp[1] = 0;
484 script->functionTemp[2] = 0;
485 script->functionTemp[3] = 0;
487 script->functionTemp[0] = 1;
494 if (state->
curPos.
x < -190.0f) {
495 if (
script->functionTemp[1] != 0) {
496 script->functionTemp[0] = 2;
499 if (state->
angle >= 270.0f && state->
angle < 360.0f) {
503 if (state->
angle >= 180.0f && state->
angle < 270.0f) {
508 if (
script->functionTemp[3] != 0) {
516 if (state->
curPos.
x > 190.0f) {
517 if (
script->functionTemp[1] != 0) {
518 script->functionTemp[0] = 2;
523 if (state->
angle >= 0.0f && state->
angle < 90.0f) {
525 }
else if (state->
angle >= 90.0f && state->
angle < 180.0f) {
530 if (
script->functionTemp[3] != 0) {
538 if (state->
curPos.
y < -30.0f) {
539 if (
script->functionTemp[1] != 0) {
540 script->functionTemp[0] = 2;
545 if (state->
angle >= 270.0f && state->
angle < 360.0f) {
547 }
else if (state->
angle >= 0.0f && state->
angle < 90.0f) {
552 if (
script->functionTemp[3] != 0) {
560 if (state->
curPos.
y > 160.0f) {
561 if (
script->functionTemp[1] != 0) {
562 script->functionTemp[0] = 2;
567 if (state->
angle >= 90.0f && state->
angle < 180.0f) {
569 }
else if (state->
angle >= 180.0f && state->
angle < 270.0f) {
574 if (
script->functionTemp[3] != 0) {
586 script->functionTemp[1] = 1;
591 switch (
script->functionTemp[0]) {
594 script->functionTemp[0] = 3;
614 script->varTable[15] = ((
script->varTable[0] * 100) / 2499) + 2;
664 .posOffset = { 0, 0, 0 },
665 .targetOffset = { 11, 28 },
670 .elementImmunityFlags = 0,
671 .projectileTargetOffset = { 0, 0 },
686 .hurricaneChance = 0,
688 .upAndAwayChance = 0,
690 .powerBounceChance = 80,
693 .healthBarOffset = { 0, 0 },
694 .statusIconOffset = { -10, 30 },
695 .statusTextOffset = { 10, 30 },
BSS s32 PopupMenu_SelectedIndex
BSS ActionCommandStatus gActionCommandStatus
void increment_action_command_attempt_count(void)
void increment_action_command_success_count(void)
void action_command_init_status(void)
HudScript HES_StickNeutral
HudScript HES_StickHoldLeft
HudScript HES_AimShimmerD
HudScript HES_AimShimmerE
HudScript HES_AimShimmerF
HudScript HES_AimShimmerA
HudScript HES_AimShimmerB
HudScript HES_AimShimmerC
#define sfx_play_sound_at_position
EffectInstanceDataPtr data
struct Effect65FXData * unk_65
@ FX_INSTANCE_FLAG_DISMISS
@ ACTION_COMMAND_AIR_LIFT
@ ACTION_COMMAND_AIR_RAID
@ BS_FLAGS1_STAR_POINTS_DROPPED
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_GROUNDABLE
Actor can be knocked down from flight; triggered by jump attacks.
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
@ BTL_MENU_TYPE_STAR_POWERS
#define SUPPRESS_EVENTS_KOOPER_DAMAGE
@ STATUS_TURN_MOD_DEFAULT
@ STATUS_TURN_MOD_PARALYZE
@ HIT_RESULT_NICE_NO_DAMAGE
@ BTL_CAM_PARTNER_MISTAKE
@ SUPPRESS_EVENT_SPIKY_TOP
@ SUPPRESS_EVENT_ALT_SPIKY
@ SUPPRESS_EVENT_SPIKY_FRONT
@ SUPPRESS_EVENT_BURN_CONTACT
@ SOUND_PARAKARRY_PREDIVE
@ SOUND_PARAKARRY_SHELL_SHOT
@ SOUND_PARAKARRY_AIR_RAID_1
@ SOUND_PARAKARRY_AIR_RAID_2
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
@ DAMAGE_TYPE_MULTIPLE_POPUPS
void btl_set_popup_duration(s32 duration)
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32 *screenX, s32 *screenY, s32 *screenZ)
ActorPart * get_actor_part(Actor *actor, s32 partID)
Actor * get_actor(s32 actorID)
void set_goal_pos_to_part(ActorState *state, s32 actorID, s32 partID)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
f32 get_clamped_angle_diff(f32, f32)
void hud_element_create_transform_A(s32 id)
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_set_render_depth(s32 id, s32 z)
void hud_element_set_transform_rotation(s32 id, f32 x, f32 y, f32 z)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_free(s32 id)
EvtScript EVS_Partner_Hit
EvtScript EVS_Partner_Recover
EvtScript EVS_Partner_BurnContact
EvtScript EVS_Partner_Drop
EvtScript EVS_Partner_NoDamageHit
EvtScript EVS_Partner_ShockHit
EvtScript EVS_Partner_BurnHit
EvtScript EVS_Partner_Celebrate
EvtScript EVS_Partner_SpikeContact
EvtScript EVS_Partner_RunAway
void sfx_play_sound(s32 soundID)
ApiStatus StopSound(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 Mul(VAR, INT_VALUE)
#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 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 Div(VAR, INT_VALUE)
#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
GameStatus * gGameStatusPtr
BattleStatus gBattleStatus