Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
time_out.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "sprite/npc/BattleKlevar.h"
4#include "sprite/player.h"
5
6#define NAMESPACE battle_move_time_out
7
9
10EvtScript N(EVS_UsePower) = {
11 ExecWait(N(EVS_StarPower_WishForSpirit))
12 SetConst(LVar0, ANIM_BattleKlevar_Idle)
13 ExecWait(N(EVS_StarPower_SpiritSummoned))
14 Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleKlevar_Shout)
15 Wait(16)
16 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
18 PlayEffect(EFFECT_STOP_WATCH, 0, 0, 0, 0, Float(1.0), 200, 0)
19 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TIME_OUT)
20 Wait(200)
21 Call(InitTargetIterator)
22 Label(0)
23 Call(SetGoalToTarget, ACTOR_SELF)
24 Call(ItemCheckHit, LVar0, 0, 0, 0, 0)
26 Goto(1)
27 EndIf
29 Wait(5)
30 Label(1)
31 Call(ChooseNextTarget, ITER_NEXT, LVar0)
33 Goto(0)
34 EndIf
35 Wait(5)
36 Call(PlayerYieldTurn)
37 ExecWait(N(EVS_StarPower_SpiritDeparts))
38 ExecWait(N(EVS_StarPower_EndWish))
39 Return
40 End
41};
Bytecode EvtScript[]
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ NPC_BTL_SPIRIT
Definition enums.h:2531
@ STATUS_FLAG_STOP
Definition enums.h:2821
@ SOUND_TIME_OUT
Definition enums.h:967
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define DMG_STATUS_KEY(typeFlag, duration, chance)
Definition macros.h:224
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define PlayEffect(args...)
Definition macros.h:807
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217