Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
CheckPlayerCanLoseCommand.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3API_CALLABLE(N(CheckPlayerCanLoseCommand)) {
5 Bytecode* args = script->ptrReadPos;
6
7 if (status->hammerLossTurns == -1 || status->jumpLossTurns == -1 || status->itemLossTurns == -1) {
8 evt_set_variable(script, *args++, 0);
9 } else {
10 evt_set_variable(script, *args++, -1);
11 }
12
13 return ApiStatus_DONE2;
14}
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1847
BattleStatus gBattleStatus
Definition battle.c:11