Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
peach_focus_alt.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "sprite/player.h"
4
5#define NAMESPACE battle_move_peach_focus_alt
6
8
9API_CALLABLE(N(RestoreStarPower)) {
12
15 }
17 playerData->starPower += SP_PER_BAR;
18 }
19
20 playerData->starPower += SP_PER_SEG * 4;
21
22 if (playerData2->starPower >= playerData2->maxStarPower * SP_PER_BAR) {
23 playerData2->starPower = playerData2->maxStarPower * SP_PER_BAR;
24 }
25
26 return ApiStatus_DONE2;
27}
28
31 Wait(10)
34 Add(LVar0, 16)
38 Wait(8)
40 Add(LVar1, 20)
43 Wait(20)
45 Wait(10)
47 Add(LVar1, 20)
49 Wait(30)
52 Wait(10)
54 Wait(15)
60 Return
61 End
62};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
@ BTL_CAM_PLAYER_WISH
Definition enums.h:4890
@ ABILITY_DEEP_FOCUS
Definition enums.h:484
@ ABILITY_SUPER_FOCUS
Definition enums.h:485
@ ACTOR_PLAYER
Definition enums.h:2085
#define ApiStatus_DONE2
Definition evt.h:118
s32 is_ability_active(s32 arg0)
Definition inventory.c:1736
ApiStatus FadeBackgroundLighten(Evt *script, b32 isInitialCall)
ApiStatus FadeBackgroundDarken(Evt *script, b32 isInitialCall)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define Float(DOUBLE)
Definition macros.h:51
#define LVar2
Definition macros.h:150
#define SP_PER_SEG
Definition macros.h:103
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define SP_PER_BAR
Definition macros.h:102
#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 Return
Kills the current EVT thread.
Definition macros.h:217
PlayerData gPlayerData
Definition 77480.c:40