Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
battle::actor::goomba Namespace Reference

Enumerations

enum  ActorPartIDs { PRT_MAIN = 1 }
 

Variables

EvtScript EVS_Idle
 
EvtScript EVS_TakeTurn
 
EvtScript EVS_HandleEvent
 
constexpr s32 hp = 2
 
constexpr s32 dmgHeadbonk = 1
 
EvtScript EVS_Init
 
s32 DefaultAnims []
 
s32 DefenseTable []
 
s32 StatusTable []
 
ActorPartBlueprint ActorParts []
 
s32 ShuffleAnims []
 
EvtScript EVS_Move_Headbonk
 

Enumeration Type Documentation

◆ ActorPartIDs

Enumerator
PRT_MAIN 

Definition at line 24 of file goomba_family.inc.cpp.

24 {
25 PRT_MAIN = 1,
26};

Variable Documentation

◆ EVS_Idle

EvtScript battle::actor::goomba::EVS_Idle

Definition at line 111 of file goomba_family.inc.cpp.

111 {
112 Label(10)
113 Call(RandInt, 80, LVar0)
114 Add(LVar0, 80)
115 Loop(LVar0)
116 Label(0)
119 Wait(1)
120 Goto(0)
121 EndIf
122 Wait(1)
123 EndLoop
125 Add(LVar0, 5)
127 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(ShuffleAnims))
130 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(DefaultAnims))
131 Loop(20)
132 Label(1)
135 Wait(1)
136 Goto(1)
137 EndIf
138 Wait(1)
139 EndLoop
141 Sub(LVar0, 5)
143 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(ShuffleAnims))
146 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(DefaultAnims))
147 Loop(80)
148 Label(2)
151 Wait(1)
152 Goto(2)
153 EndIf
154 Wait(1)
155 EndLoop
156 Goto(10)
157 Return
158 End
159};
BSS s32 PopupMenu_SelectedIndex
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ ACTOR_SELF
Definition enums.h:2084
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#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 EndLoop
Marks the end of a loop.
Definition macros.h:248
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#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 Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217

◆ EVS_TakeTurn

EvtScript battle::actor::goomba::EVS_TakeTurn
Initial value:
= {
ExecWait(EVS_Move_Headbonk)
}
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475

Definition at line 459 of file goomba_family.inc.cpp.

459 {
460 ExecWait(EVS_Move_Headbonk)
461 Return
462 End
463};

◆ EVS_HandleEvent

EvtScript battle::actor::goomba::EVS_HandleEvent

Definition at line 161 of file goomba_family.inc.cpp.

161 {
164 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
169 SetConst(LVar0, PRT_MAIN)
174 SetConst(LVar0, PRT_MAIN)
179 SetConst(LVar0, PRT_MAIN)
183 SetConst(LVar0, PRT_MAIN)
186 Return
188 SetConst(LVar0, PRT_MAIN)
192 SetConst(LVar0, PRT_MAIN)
195 SetConst(LVar0, PRT_MAIN)
198 Return
200 SetConst(LVar0, PRT_MAIN)
203 SetConst(LVar0, PRT_MAIN)
207 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
212 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
213 Wait(5)
218 SetConst(LVar0, PRT_MAIN)
221 SetConst(LVar0, PRT_MAIN)
224 Return
226 // do nothing
230 SetConst(LVar0, PRT_MAIN)
235 SetConst(LVar0, PRT_MAIN)
238 Wait(10)
239 SetConst(LVar0, PRT_MAIN)
242 Return
244 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
249 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
252 SetConst(LVar0, PRT_MAIN)
256 SetConst(LVar0, PRT_MAIN)
260 Return
262 SetConst(LVar0, PRT_MAIN)
266 SetConst(LVar0, PRT_MAIN)
269 Return
275 Return
276 End
277};
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6407
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6406
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_STAR_BEAM
Definition enums.h:2140
@ EVENT_END_FIRST_STRIKE
Definition enums.h:2171
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ 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_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#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 EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#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 EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370

◆ hp

constexpr s32 battle::actor::goomba::hp = 2
constexpr

Definition at line 18 of file goomba_family.inc.cpp.

◆ dmgHeadbonk

constexpr s32 battle::actor::goomba::dmgHeadbonk = 1
constexpr

Definition at line 19 of file goomba_family.inc.cpp.

◆ EVS_Init

EvtScript battle::actor::goomba::EVS_Init
Initial value:
= {
Call(BindTakeTurn, ACTOR_SELF, Ref(EVS_TakeTurn))
Call(BindIdle, ACTOR_SELF, Ref(EVS_Idle))
Call(BindHandleEvent, ACTOR_SELF, Ref(EVS_HandleEvent))
}

Definition at line 103 of file goomba_family.inc.cpp.

103 {
104 Call(BindTakeTurn, ACTOR_SELF, Ref(EVS_TakeTurn))
105 Call(BindIdle, ACTOR_SELF, Ref(EVS_Idle))
106 Call(BindHandleEvent, ACTOR_SELF, Ref(EVS_HandleEvent))
107 Return
108 End
109};

◆ DefaultAnims

s32 battle::actor::goomba::DefaultAnims
Initial value:

Definition at line 73 of file goomba_family.inc.cpp.

◆ DefenseTable

s32 battle::actor::goomba::DefenseTable[]
Initial value:
= {
}
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115

Definition at line 28 of file goomba_family.inc.cpp.

28 {
31};

◆ StatusTable

s32 battle::actor::goomba::StatusTable[]
Initial value:
= {
}
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DEFAULT
Definition enums.h:2198

Definition at line 33 of file goomba_family.inc.cpp.

◆ ActorParts

ActorPartBlueprint battle::actor::goomba::ActorParts[]
Initial value:
= {
{
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
.opacity = 255,
.idleAnimations = DefaultAnims,
.defenseTable = DefenseTable,
.eventFlags = ACTOR_EVENT_FLAGS_NONE,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -10 },
},
}
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362

Definition at line 58 of file goomba_family.inc.cpp.

58 {
59 {
61 .index = PRT_MAIN,
62 .posOffset = { 0, 0, 0 },
63 .targetOffset = { 0, 20 },
64 .opacity = 255,
65 .idleAnimations = DefaultAnims,
66 .defenseTable = DefenseTable,
67 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
68 .elementImmunityFlags = 0,
69 .projectileTargetOffset = { 0, -10 },
70 },
71};

◆ ShuffleAnims

◆ EVS_Move_Headbonk

EvtScript battle::actor::goomba::EVS_Move_Headbonk

Definition at line 281 of file goomba_family.inc.cpp.

281 {
290 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
295 Wait(1)
297 Wait(5)
304 Set(LVarA, LVar0)
307 Sub(LVar0, 10)
308 Set(LVar1, 10)
309 Add(LVar2, 3)
312 Thread
314 Set(LVar0, 0)
315 Loop(16)
319 Set(LVar1, LVar4)
320 Set(LVar2, LVar5)
321 Set(LVar3, LVar6)
322 Wait(1)
323 EndLoop
325 Thread
326 Wait(6)
331 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
333 Wait(1)
334 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
336 Wait(1)
337 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
340 Wait(5)
343 EndIf
344 Wait(5)
349 Add(LVar0, 20)
350 Set(LVar1, 0)
353 Thread
354 Wait(4)
355 Set(LVar0, 180)
356 Loop(4)
357 Sub(LVar0, 45)
359 Wait(1)
360 EndLoop
365 Wait(5)
372 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
376 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
378 Wait(5)
385 Return
390 Thread
392 Set(LVar0, 0)
393 Loop(16)
397 Set(LVar1, LVar4)
398 Set(LVar2, LVar5)
399 Set(LVar3, LVar6)
400 Wait(1)
401 EndLoop
403 Thread
404 Wait(6)
409 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
410 Wait(1)
411 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
412 Wait(1)
418 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
419 Wait(1)
420 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
421 Wait(1)
427 Add(LVar0, 40)
428 Set(LVar1, 0)
432 Add(LVar0, 30)
435 Add(LVar0, 20)
439 Wait(3)
443 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
448 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
453 Return
454 End
455};
@ BTL_CAM_XADJ_AVG
Definition enums.h:4899
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3570
@ ACTOR_EVENT_FLAG_ATTACK_CHARGED
Actor has charged an attack that can be removed with Star Beam.
Definition enums.h:3389
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_LUCKY
Definition enums.h:1955
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4884
@ ACTOR_PLAYER
Definition enums.h:2085
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4904
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
#define LVar6
Definition macros.h:154
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define LVar5
Definition macros.h:153
#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 LVarA
Definition macros.h:158
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151