Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
bill_blaster.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "battle/battle.h"
4#include "script_api/battle.h"
5#include "sprite/npc/BillBlaster.h"
6
7#define NAMESPACE A(bill_blaster)
8
9extern s32 N(DefaultAnims)[];
10extern EvtScript N(EVS_Init);
11extern EvtScript N(EVS_Idle);
12extern EvtScript N(EVS_TakeTurn);
16
19
20enum N(ActorPartIDs) {
21 PRT_MAIN = 1,
22 PRT_TARGET = 2,
23};
24
25enum N(ActorVars) {
26 AVAR_BulletID = 0,
28};
29
30s32 N(DefenseTable)[] = {
33};
34
35s32 N(StatusTable)[] = {
58};
59
61 {
63 .index = PRT_MAIN,
64 .posOffset = { 0, 0, 0 },
65 .targetOffset = { -6, 29 },
66 .opacity = 255,
67 .idleAnimations = N(DefaultAnims),
68 .defenseTable = N(DefenseTable),
69 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
70 .elementImmunityFlags = 0,
71 .projectileTargetOffset = { 0, -9 },
72 },
73 {
75 .index = PRT_TARGET,
76 .posOffset = { 100, 0, 0 },
77 .targetOffset = { -106, 29 },
78 .opacity = 255,
79 .idleAnimations = N(DefaultAnims),
80 .defenseTable = N(DefenseTable),
81 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
82 .elementImmunityFlags = 0,
83 .projectileTargetOffset = { 0, -9 },
84 },
85};
86
87ActorBlueprint NAMESPACE = {
88 .flags = 0,
91 .maxHP = 4,
92 .partCount = ARRAY_COUNT(N(ActorParts)),
93 .partsData = N(ActorParts),
94 .initScript = &N(EVS_Init),
95 .statusTable = N(StatusTable),
96 .escapeChance = 0,
97 .airLiftChance = 20,
98 .hurricaneChance = 15,
99 .spookChance = 0,
100 .upAndAwayChance = 95,
101 .spinSmashReq = 4,
102 .powerBounceChance = 100,
103 .coinReward = 1,
104 .size = { 55, 32 },
105 .healthBarOffset = { 8, 0 },
106 .statusIconOffset = { -24, 20 },
107 .statusTextOffset = { 5, 25 },
108};
109
110s32 N(DefaultAnims)[] = {
116};
117
118EvtScript N(EVS_Init) = {
123 Return
124 End
125};
126
127EvtScript N(EVS_Idle) = {
128 Return
129 End
130};
131
146 SetConst(LVar2, -1)
151 SetConst(LVar2, -1)
156 Return
168 Wait(10)
172 Return
185 Return
190 Return
191 End
192};
193
199 CaseEq(0)
201 CaseEq(1)
206 Return
207 End
208};
209
210API_CALLABLE(N(SetBulletInitVars)) {
211 N(BulletFormation)[0].var0 = TRUE;
212 N(BulletFormation)[0].var1 = script->owner1.actorID;
213
214 return ApiStatus_DONE2;
215}
216
219 Wait(13)
220 Thread
221 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0))
226 Sub(LVar0, 33)
227 Add(LVar1, 19)
228 Add(LVar2, 3)
229 PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0)
230 PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0)
231 Wait(2)
236 Return
237 End
238};
239
245 EndIf
246 Return
247 End
248};
249
251
254};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ 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_STONE
Definition enums.h:2208
@ 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
@ SOUND_BULLET_BILL_FIRE
Definition enums.h:1034
@ BTL_RUMBLE_PLAYER_HEAVY
Definition enums.h:4260
@ ACTOR_SELF
Definition enums.h:2084
@ 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
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC
Definition enums.h:3366
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
Definition enums.h:3360
@ ACTOR_PART_FLAG_INVISIBLE
Definition enums.h:3350
@ CAM_BATTLE
Definition enums.h:1801
#define ApiStatus_DONE2
Definition evt.h:118
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#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 Sub(VAR, INT_VALUE)
Definition macros.h:377
#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 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 Float(DOUBLE)
Definition macros.h:51
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#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 Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define NPC_DISPOSE_LOCATION
Definition macros.h:162
#define A(sym)
Definition macros.h:36
#define PlayEffect(args...)
Definition macros.h:807
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#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
#define ACTOR_BY_POS(_name, _pos, _priority, args...)
Definition battle.h:230
FormationRow Formation[]
Definition battle.h:167