6#include "sprite/npc/Twink.h"
7#include "sprite/npc/BattleMerlee.h"
10#include "sprite/player.h"
108 for (i = 0; i < 8; i++) {
112 for (i = 0; i < 8; i++) {
119 script->varTable[0] =
pcao->options[i * 2 + 1];
135 for (i = 0; i < 8; i++) {
139 for (i = 0; i < 8; i++) {
191 f32 posX, posY, posZ;
199 sellValue = (sellValue * 75 + 99) / 100;
201 for (i = 0; i < sellValue; i++) {
210 delayTime = (i * 3) + 30;
220 script->varTable[0] = delayTime;
240 script->functionTemp[0] = 20;
245 script->functionTemp[0]--;
247 if (
script->functionTemp[0] == 0) {
256 script->functionTemp[0] = 20;
262 script->functionTemp[0]--;
263 if (
script->functionTemp[0] == 0) {
355 script->functionTemp[0] = 25;
359 script->functionTemp[0]--;
361 if (
script->functionTemp[0] == 0) {
370 script->functionTemp[0] = 25;
375 script->functionTemp[0] -= 5;
376 if (
script->functionTemp[0] == 0) {
393 if (
merlee->alpha >= 255) {
418 script->functionTemp[1] = 0;
428 script->functionTemp[1] += 10;
452 if (data->
scale > 3.5) {
461 if (data->
scale > 5.0) {
498 if (
script->varTable[10] > 0) {
504 if (
script->varTable[11] > 0 ||
script->varTable[12] > 0) {
512 if (
script->varTable[10] > 0) {
515 if (
script->varTable[11] > 0 ||
script->varTable[12] > 0) {
581 script->functionTemp[0] = 0;
582 script->functionTemp[1] = 0;
585 switch (
script->functionTemp[1]) {
587 script->functionTemp[0]--;
589 if (item->
pos.
y < 0.0f) {
591 script->functionTemp[0] = 8;
592 script->functionTemp[1] = 1;
596 script->functionTemp[0]--;
599 if (item->
pos.
y < 0.0f) {
601 script->functionTemp[0] = 4;
602 script->functionTemp[1] = 2;
606 script->functionTemp[0]--;
609 if (item->
pos.
y < 0.0f) {
611 script->functionTemp[1] = 3;
632 script->functionTemp[0] = 0;
633 script->functionTemp[1] = 10;
636 switch (
script->functionTemp[0]) {
648 player->
curPos.
y + 12.0f) / 5.0f;
650 if (
script->functionTemp[1] == 1) {
651 script->functionTemp[0] = 1;
654 script->functionTemp[1]--;
BSS s32 PopupMenu_SelectedIndex
struct ActorPart * partsTable
EffectInstanceDataPtr data
struct EnergyOrbWaveFXData * energyOrbWave
#define STATUS_FLAGS_IMMOBILIZED
@ FX_INSTANCE_FLAG_DISMISS
@ ACTION_RATING_LUCKY
clears nice hits
@ BS_FLAGS1_PLAYER_DEFENDING
@ BS_FLAGS1_SHOW_PLAYER_DECORATIONS
@ BS_FLAGS1_EXECUTING_MOVE
@ BTL_MSG_ACTION_TIP_MASH_BUTTON
@ ITEM_SPAWN_MODE_TOSS_FADE1
@ PHASE_MERLEE_ATTACK_BONUS
@ PHASE_MERLEE_DEFENSE_BONUS
@ BTL_MENU_TYPE_STAR_POWERS
@ BTL_CAM_PLAYER_HIT_HAZARD
@ BTL_CAM_PLAYER_HIT_SPIKE
@ SOUND_PLAYER_RUN_IN_PLACE
@ SOUND_LIFE_SHROOM_CHIME
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
s32 evt_get_variable(Evt *script, Bytecode var)
s32 is_ability_active(s32 arg0)
s32 player_team_is_ability_active(Actor *actor, s32 ability)
void get_screen_coords(s32 camID, f32 x, f32 y, f32 z, s32 *screenX, s32 *screenY, s32 *screenZ)
void sort_consumables(void)
Bubbles up player inventory items such that all ITEM_NONE values are at the bottom.
ItemEntity * get_item_entity(s32 itemEntityIndex)
void btl_update_ko_status(void)
void mdl_set_all_tint_type(s32)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 angle, s32 pickupVar)
s32 find_item(s32)
Search player inventory for itemID and return first matching array index.
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Actor * get_actor(s32 actorID)
void btl_show_battle_message(s32 messageIndex, s32 duration)
void deduct_current_move_fp(void)
s32 inflict_status_set_duration(Actor *actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration)
void btl_cam_unfreeze(void)
void show_action_rating(s32, Actor *, f32, f32, f32)
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)
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
Npc * get_npc_unsafe(s32 npcID)
BSS s32 BattleMerleeEffectsTime
EvtScript EVS_MerleeRunOut
EvtScript EVS_Player_NoDamageHit
BSS EffectInstance * BattleMerleeWaveEffect
EvtScript EVS_Player_SimpleHit
EvtScript EVS_Player_HandleEvent
BSS HudElemID HID_HPDrain
EvtScript EVS_PlayerFirstStrike
EvtScript EVS_MerleeExpBonus
EvtScript EVS_PeachEnterStage
EvtScript EVS_ApplyDizzyAttack
EvtScript EVS_ExecuteMarioAction
EvtScript EVS_PlayerRegainAbility
EvtScript EVS_Peach_HandlePhase
void btl_set_player_idle_anims(void)
EvtScript EVS_Unused_UseItemWithEffect
BSS s16 BattleMerleeEffectsState
EvtScript EVS_Unused_PlayerGoHome
EvtScript EVS_Mario_HandlePhase
EvtScript EVS_Peach_OnActorCreate
EvtScript EVS_Unused_UseItem
EvtScript EVS_MerleeDefenseBonus
EvtScript EVS_Player_ComplexHit
EvtScript EVS_Unused_DrinkItem
EvtScript EVS_MarioEnterStage
BSS EffectInstance * BattleMerleeOrbEffect
PlayerCelebrationAnimOptions bPlayerCelebrations
EvtScript EVS_Player_Celebrate
EvtScript EVS_StartDefend
EvtScript EVS_PlayerHappy
EvtScript EVS_Mario_OnActorCreate
EvtScript EVS_UseLifeShroom
EvtScript EVS_RunAwayFail
EvtScript EVS_MerleeAttackBonus
EvtScript EVS_RunAwayStart
EvtScript EVS_Unused_EatItem
BSS f32 BattleMerleeBasePosY
EvtScript EVS_ExecutePeachAction
EvtScript EVS_RunAwayNoCommand
void sfx_play_sound(s32 soundID)
ApiStatus RemoveItemEntity(Evt *script, b32 isInitialCall)
ApiStatus DeleteNpc(Evt *script, b32 isInitialCall)
ApiStatus SetItemPos(Evt *script, b32 isInitialCall)
ApiStatus SetItemFlags(Evt *script, b32 isInitialCall)
ApiStatus RemoveEffect(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
ApiStatus SetNpcRenderMode(Evt *script, b32 isInitialCall)
ApiStatus CreateNpc(Evt *script, b32 isInitialCall)
ApiStatus SetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus MakeItemEntity(Evt *script, b32 isInitialCall)
ApiStatus ShowStartRecoveryShimmer(Evt *script, b32 isInitialCall)
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(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 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 CaseNe(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 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 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 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 IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set 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 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
struct Actor * playerActor
u8 * gBackgroundTintModePtr
BattleStatus gBattleStatus
s32 gDefeatedBattleSubstate