Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
d_down_pound.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "effects.h"
4
5#define NAMESPACE battle_move_d_down_pound
6
8
9API_CALLABLE(N(MakeGreenImpactFX)) {
10 Bytecode* args = script->ptrReadPos;
11 s32 x = evt_get_variable(script, *args++);
12 s32 y = evt_get_variable(script, *args++);
13 s32 z = evt_get_variable(script, *args++);
14 b32 success = script->varTable[10]; // value from GetPlayerActionQuality
15
16 if (!success) {
17 fx_green_impact(TRUE, x + 30, y + 25, z, 45.0f);
18 } else {
19 fx_green_impact(FALSE, x + 30, y + 25, z, 45.0f);
20 }
21
22 return ApiStatus_DONE2;
23}
24
26
32 CaseEq(0)
33 Set(LVarD, 50) // duration
37 CaseEq(1)
38 Set(LVarD, 50) // duration
42 CaseEq(2)
43 Set(LVarD, 50) // duration
48 Return
49 End
50};
51
55 CaseEq(0)
57 CaseEq(1)
59 CaseEq(2)
68 CaseEq(0)
70 Thread
71 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3))
73 CaseEq(1)
75 Thread
76 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6))
78 CaseEq(2)
80 Thread
81 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9))
87 CaseEq(0)
89 Thread
90 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3))
92 CaseEq(1)
94 Thread
95 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
97 CaseEq(2)
99 Thread
100 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9))
108 Else
111 EndIf
114 CaseEq(0)
116 CaseEq(1)
118 CaseEq(2)
124 Return
125 EndIf
146 Return
147 End
148};
BSS s32 PopupMenu_SelectedIndex
#define BASIC_HAMMER_DMG_GOOD
#define SUPER_HAMMER_DMG_GOOD
#define BASIC_HAMMER_DMG_BAD
#define ULTRA_HAMMER_DMG_GOOD
#define SUPER_HAMMER_DMG_BAD
#define ULTRA_HAMMER_DMG_BAD
s32 b32
Bytecode EvtScript[]
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3609
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3608
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3604
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1978
@ HIT_RESULT_HIT
Definition enums.h:1976
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1979
@ HIT_RESULT_NICE
Definition enums.h:1977
@ HIT_RESULT_MISS
Definition enums.h:1982
@ BTL_CAM_PLAYER_HAMMER_STRIKE
Definition enums.h:4451
#define SUPPRESS_EVENTS_HAMMER
Definition enums.h:2946
@ DMG_SRC_D_DOWN_POUND
Definition enums.h:2017
@ SOUND_D_DOWN_HIT_1
Definition enums.h:1550
@ SOUND_D_DOWN_HIT_3
Definition enums.h:1552
@ SOUND_D_DOWN_HIT_2
Definition enums.h:1551
@ BTL_RUMBLE_PLAYER_HEAVY
Definition enums.h:3860
@ BTL_RUMBLE_PLAYER_EXTREME
Definition enums.h:3861
@ BTL_RUMBLE_PLAYER_LIGHT
Definition enums.h:3859
@ ACTOR_PLAYER
Definition enums.h:2118
@ CAM_BATTLE
Definition enums.h:1827
@ DAMAGE_TYPE_SMASH
Definition enums.h:2891
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2911
#define ApiStatus_DONE2
Definition evt.h:119
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1725
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:296
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:366
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:320
#define LVarF
Definition macros.h:164
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:353
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:279
#define Float(DOUBLE)
Definition macros.h:52
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:342
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:299
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:476
#define Thread
Marks the start of a thread block.
Definition macros.h:545
#define EndThread
Marks the end of a thread block.
Definition macros.h:548
#define LVar2
Definition macros.h:151
#define LVar1
Definition macros.h:150
#define LVarA
Definition macros.h:159
#define LVarD
Definition macros.h:162
#define LVar9
Definition macros.h:158
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:363
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:270
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
Definition macros.h:329
#define LVarE
Definition macros.h:163
#define LVar0
Definition macros.h:149
#define Return
Kills the current EVT thread.
Definition macros.h:218