Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
peach_beam.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "model.h"
4
5#define NAMESPACE battle_move_peach_beam
6
9
10EvtScript N(EVS_UsePower) = {
11 ExecWait(N(EVS_StarPower_WishForBeam))
12 Call(AddBattleCamDist, 100)
13 Call(MoveBattleCamOver, 20)
14 Call(InitTargetIterator)
15 Call(SetGoalToTarget, ACTOR_SELF)
16 Thread
17 Call(N(ProcessPeachStarBeam), TRUE)
19 Wait(10)
20 Loop(0)
21 Wait(1)
22 Call(N(GetStage))
23 IfEq(LVar0, 1)
25 EndIf
27 Call(InitTargetIterator)
28 Label(0)
29 Call(SetGoalToTarget, ACTOR_SELF)
31 Call(ChooseNextTarget, ITER_NEXT, LVar0)
33 Goto(0)
34 EndIf
35 Loop(0)
36 Wait(1)
37 Call(N(GetStage))
38 IfEq(LVar0, 2)
40 EndIf
42 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
43 Call(N(unkStarBeamBgFunc))
44 Call(PlayerYieldTurn)
45 ExecWait(N(EVS_StarPower_EndWish))
46 Return
47 End
48};
Bytecode EvtScript[]
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ ACTOR_SELF
Definition enums.h:2084
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ DAMAGE_TYPE_PEACH_BEAM
Definition enums.h:2873
#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 EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#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 BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#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 Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217