Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
volt_shroom.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "effects.h"
4#include "sprite/player.h"
5
6#define NAMESPACE battle_item_volt_shroom
7
9
10API_CALLABLE(N(func_802A123C_71AA2C)) {
12 Actor* player = battleStatus->playerActor;
13
14 inflict_status(player, STATUS_KEY_STATIC, script->varTable[0]);
15 player->statusAfflicted = 0;
16 return ApiStatus_DONE2;
17}
18
20
27 Set(LVar3, 20)
30 SetF(LVar3, Float(1.0))
36 Wait(20)
40 Return
41 End
42};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
s8 statusAfflicted
@ BTL_MSG_PLAYER_CHARGED
Definition enums.h:3716
@ STATUS_KEY_STATIC
Definition enums.h:2812
@ SOUND_VOLT_SHROOM_APPLY
Definition enums.h:1196
@ ACTOR_PLAYER
Definition enums.h:2118
#define ApiStatus_DONE2
Definition evt.h:119
s32 inflict_status(Actor *, s32, s32)
Definition 190B20.c:1816
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus GetItemPower(Evt *script, b32 isInitialCall)
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:366
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define Add(VAR, INT_VALUE)
Definition macros.h:377
#define Float(DOUBLE)
Definition macros.h:52
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:476
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:374
#define LVar2
Definition macros.h:151
#define LVar1
Definition macros.h:150
#define LVarA
Definition macros.h:159
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define PlayEffect(args...)
Definition macros.h:811
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define LVar3
Definition macros.h:152
#define LVar0
Definition macros.h:149
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:371
#define Return
Kills the current EVT thread.
Definition macros.h:218
BattleStatus gBattleStatus
Definition battle.cpp:14