Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
CanPlayerLoseAction.inc.c
Go to the documentation of this file.
1
#include "common.h"
2
3
API_CALLABLE(N(CanPlayerLoseAction)) {
4
BattleStatus
* battleStatus = &
gBattleStatus
;
5
Bytecode
* args = script->ptrReadPos;
6
7
if
(
get_actor
(script->owner1.actorID)->
debuff
!=
STATUS_KEY_SHRINK
) {
8
if
(
gBattleStatus
.
hammerLossTurns
== -1 ||
gBattleStatus
.
jumpLossTurns
== -1 ||
gBattleStatus
.
itemLossTurns
== -1) {
9
evt_set_variable
(script, *args++, 0);
10
return
ApiStatus_DONE2
;
11
}
else
{
12
evt_set_variable
(script, *args++, -1);
13
return
ApiStatus_DONE2
;
14
}
15
}
else
{
16
evt_set_variable
(script, *args++, -1);
17
return
ApiStatus_DONE2
;
18
}
19
}
Actor::debuff
s8 debuff
Definition
common_structs.h:1918
STATUS_KEY_SHRINK
@ STATUS_KEY_SHRINK
Definition
enums.h:2206
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
Bytecode
s32 Bytecode
Definition
evt.h:7
evt_set_variable
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition
evt.c:1847
get_actor
Actor * get_actor(s32 actorID)
Definition
actor_api.c:155
BattleStatus
Definition
common_structs.h:856
BattleStatus::jumpLossTurns
s8 jumpLossTurns
Definition
common_structs.h:919
BattleStatus::itemLossTurns
s8 itemLossTurns
Definition
common_structs.h:920
BattleStatus::hammerLossTurns
s8 hammerLossTurns
Definition
common_structs.h:918
gBattleStatus
BattleStatus gBattleStatus
Definition
battle.c:11
src
common
CanPlayerLoseAction.inc.c
Generated by
1.10.0