Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
defend.c
Go to the documentation of this file.
1#include "states.h"
2#include "script_api/battle.h"
3
4enum {
5 // BTL_SUBSTATE_INIT = 0,
7};
8
11 Evt* script;
12
13 switch (gBattleSubState) {
16
17 // prompt player to handle PHASE_USE_DEFEND
20 player->takeTurnScriptID = script->id;
21 script->owner1.actorID = ACTOR_PLAYER;
23 break;
25 // wait for PHASE_USE_DEFEND event to complete
27 break;
28 }
29
30 // done waiting for the script
32 break;
33 }
34}
35
37}
BSS s32 PopupMenu_SelectedIndex
struct Evt * takeTurnScript
s32 takeTurnScriptID
@ BTL_SUBSTATE_AWAIT
Definition defend.c:6
void btl_state_draw_defend(void)
Definition defend.c:36
void btl_state_update_defend(void)
Definition defend.c:9
@ PHASE_USE_DEFEND
Definition enums.h:2096
@ BATTLE_STATE_END_PLAYER_TURN
Definition enums.h:3686
@ ACTOR_PLAYER
Definition enums.h:2118
@ EVT_PRIORITY_A
Definition evt.h:154
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
s32 does_script_exist(s32 id)
void btl_set_state(s32 battleState)
EvtScript EVS_Mario_HandlePhase
@ BTL_SUBSTATE_INIT
Definition states.h:8
struct Actor * playerActor
BattleStatus gBattleStatus
Definition battle.cpp:14
s32 gBattleSubState
Definition battle.cpp:17