8#include "sprite/npc/BattleParakarry.h"
10#define NAMESPACE battle_partner_parakarry
43static s32 hudMarkers[7];
44static s32 hudShimmers[6];
46static s32 hudTargetRotation;
47static s32 shellShotTimer;
49static s32 hudStickPosX;
50static s32 hudStickPosY;
71 script->functionTemp[0] = 0;
74 switch (
script->functionTemp[0]) {
153 state->
dist = 116.0f;
156 for (i = 0; i < 30; i++) {
172 for (i = 0; i < 30; i++) {
187 hudTargetRotation = 0;
197 script->functionTemp[0] = 1;
204 if (shellShotTimer != 0) {
206 if (shellShotTimer == 0) {
219 script->functionTemp[0] = 2;
224 script->functionTemp[0] = 3;
228 if (shellShotTimer == 0) {
233 script->functionTemp[0] = 3;
245 state->
vel = 0.0f - state->
vel;
250 state->
vel = 0.0f - state->
vel;
258 if (state->
vel >= 0.0f) {
293 if (
script->functionTemp[0] < 3) {
294 if (
script->functionTemp[0] > 0) {
307 if (hudStickPosX >= 51) {
318 hudTargetRotation -= 10;
319 hudTargetRotation =
clamp_angle(hudTargetRotation);
321 if (
script->functionTemp[0] >= 2) {
322 if (
script->functionTemp[0] < 3) {
338 hid = hudShimmers[i];
354 switch (
battleStatus->partnerActor->actorBlueprint->level) {
386 if (airLiftChance > 0) {
389 if (airLiftChance > 100) {
394 airLiftChance = airLiftChance * 150 / 100;
396 if (airLiftChance > 150) {
402 script->varTable[0] = airLiftChance;
418 script->functionTemp[0] = 0;
424 switch (
script->functionTemp[0]) {
431 script->functionTemp[0] = 1;
445 if (
parakarry->state.curPos.x > 240.0f) {
467 script->functionTemp[0] = 0;
470 switch (
script->functionTemp[0]) {
478 state->
speed = 48.0f;
479 script->functionTemp[1] = 0;
480 script->functionTemp[2] = 0;
481 script->functionTemp[3] = 0;
483 script->functionTemp[0] = 1;
490 if (state->
curPos.
x < -190.0f) {
491 if (
script->functionTemp[1] != 0) {
492 script->functionTemp[0] = 2;
495 if (state->
angle >= 270.0f && state->
angle < 360.0f) {
499 if (state->
angle >= 180.0f && state->
angle < 270.0f) {
504 if (
script->functionTemp[3] != 0) {
512 if (state->
curPos.
x > 190.0f) {
513 if (
script->functionTemp[1] != 0) {
514 script->functionTemp[0] = 2;
519 if (state->
angle >= 0.0f && state->
angle < 90.0f) {
521 }
else if (state->
angle >= 90.0f && state->
angle < 180.0f) {
526 if (
script->functionTemp[3] != 0) {
534 if (state->
curPos.
y < -30.0f) {
535 if (
script->functionTemp[1] != 0) {
536 script->functionTemp[0] = 2;
541 if (state->
angle >= 270.0f && state->
angle < 360.0f) {
543 }
else if (state->
angle >= 0.0f && state->
angle < 90.0f) {
548 if (
script->functionTemp[3] != 0) {
556 if (state->
curPos.
y > 160.0f) {
557 if (
script->functionTemp[1] != 0) {
558 script->functionTemp[0] = 2;
563 if (state->
angle >= 90.0f && state->
angle < 180.0f) {
565 }
else if (state->
angle >= 180.0f && state->
angle < 270.0f) {
570 if (
script->functionTemp[3] != 0) {
582 script->functionTemp[1] = 1;
587 switch (
script->functionTemp[0]) {
590 script->functionTemp[0] = 3;
610 script->varTable[15] = ((
script->varTable[0] * 100) / 2499) + 2;
615s32 N(DefaultAnims)[] = {
626s32 N(DefenseTable)[] = {
631s32 N(StatusTable)[] = {
660 .posOffset = { 0, 0, 0 },
661 .targetOffset = { 11, 28 },
663 .idleAnimations = N(DefaultAnims),
664 .defenseTable = N(DefenseTable),
666 .elementImmunityFlags = 0,
667 .projectileTargetOffset = { 0, 0 },
677 .partsData = N(ActorParts),
678 .initScript = &N(EVS_Init),
679 .statusTable = N(StatusTable),
682 .hurricaneChance = 0,
684 .upAndAwayChance = 0,
686 .powerBounceChance = 80,
689 .healthBarOffset = { 0, 0 },
690 .statusIconOffset = { -10, 30 },
691 .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)
HudElemID hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
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