Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
gulpit_rocks.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "effects.h"
4#include "sprite/npc/Gulpit.h"
5
6#define NAMESPACE A(gulpit_rocks)
7
8extern EvtScript N(EVS_Init);
9extern EvtScript N(EVS_Idle);
10extern EvtScript N(EVS_TakeTurn);
12
13enum N(ActorPartIDs) {
14 PRT_MAIN = 1,
15};
16
17enum N(ActorVars) {
18 AVAR_RockType = 0,
19};
20
21s32 N(BigRockAnims)[] = {
24};
25
26s32 N(SmallRockAnims)[] = {
29};
30
31s32 N(DefenseTable)[] = {
34};
35
36s32 N(StatusTable)[] = {
59};
60
62 {
64 .index = PRT_MAIN,
65 .posOffset = { 0, 0, 0 },
66 .targetOffset = { 0, 14 },
67 .opacity = 255,
68 .idleAnimations = N(BigRockAnims),
69 .defenseTable = N(DefenseTable),
70 .eventFlags = 0,
71 .elementImmunityFlags = 0,
72 .projectileTargetOffset = { 0, -6 },
73 },
74};
75
76ActorBlueprint NAMESPACE = {
80 .maxHP = 1,
81 .partCount = ARRAY_COUNT(N(ActorParts)),
82 .partsData = N(ActorParts),
83 .initScript = &N(EVS_Init),
84 .statusTable = N(StatusTable),
85 .escapeChance = 0,
86 .airLiftChance = 100,
87 .hurricaneChance = 0,
88 .spookChance = 0,
89 .upAndAwayChance = 95,
90 .spinSmashReq = 0,
91 .powerBounceChance = 100,
92 .coinReward = 0,
93 .size = { 32, 18 },
94 .healthBarOffset = { 0, 0 },
95 .statusIconOffset = { -10, 20 },
96 .statusTextOffset = { 10, 20 },
97};
98
105 CaseEq(0)
110 CaseEq(1)
116 Return
117 End
118};
119
120EvtScript N(EVS_Idle) = {
121 Return
122 End
123};
124
128 CaseEq(0)
129 CaseEq(1)
132 Return
133 End
134};
135
170 CaseEq(0)
172 CaseEq(1)
177 Wait(30)
179 Return
185 Return
186 End
187};
188
190 Return
191 End
192};
193
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ STATUS_KEY_PARALYZE
Definition enums.h:2201
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_KEY_STATIC
Definition enums.h:2207
@ STATUS_END
Definition enums.h:2196
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_KEY_FEAR
Definition enums.h:2199
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_KEY_SLEEP
Definition enums.h:2202
@ STATUS_KEY_STOP
Definition enums.h:2204
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_KEY_DIZZY
Definition enums.h:2200
@ STATUS_KEY_POISON
Definition enums.h:2205
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_KEY_NORMAL
Definition enums.h:2197
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DEFAULT
Definition enums.h:2198
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6407
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6406
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_NO_SHADOW
Hide shadow.
Definition enums.h:3325
@ ACTOR_FLAG_TARGET_ONLY
Battle ends even if undefeated. No turn.
Definition enums.h:3334
@ ACTOR_FLAG_NO_HEALTH_BAR
Definition enums.h:3337
@ ACTOR_FLAG_NO_ATTACK
Skip attack turn.
Definition enums.h:3339
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_NoDamageHit
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define PlayEffect(args...)
Definition macros.h:807
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#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 SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217