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

Enumerations

enum  ActorPartIDs { PRT_MAIN = 1 }
 

Variables

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

Enumeration Type Documentation

◆ ActorPartIDs

Enumerator
PRT_MAIN 

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

975 {
976 PRT_MAIN = 1,
977};

Variable Documentation

◆ DefaultAnims

s32 battle::actor::spiked_goomba::DefaultAnims
Initial value:

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

◆ EVS_Init

EvtScript battle::actor::spiked_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))
}
@ ACTOR_SELF
Definition enums.h:2084
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217

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

1054 {
1055 Call(BindTakeTurn, ACTOR_SELF, Ref(EVS_TakeTurn))
1056 Call(BindIdle, ACTOR_SELF, Ref(EVS_Idle))
1057 Call(BindHandleEvent, ACTOR_SELF, Ref(EVS_HandleEvent))
1058 Return
1059 End
1060};

◆ EVS_Idle

EvtScript battle::actor::spiked_goomba::EVS_Idle

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

1062 {
1063 Label(10)
1064 Call(RandInt, 80, LVar0)
1065 Add(LVar0, 80)
1066 Loop(LVar0)
1067 Label(0)
1070 Wait(1)
1071 Goto(0)
1072 EndIf
1073 Wait(1)
1074 EndLoop
1076 Add(LVar0, 5)
1078 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(ShuffleAnims))
1081 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(DefaultAnims))
1082 Loop(20)
1083 Label(1)
1086 Wait(1)
1087 Goto(1)
1088 EndIf
1089 Wait(1)
1090 EndLoop
1092 Sub(LVar0, 5)
1094 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(ShuffleAnims))
1097 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(DefaultAnims))
1098 Loop(80)
1099 Label(2)
1102 Wait(1)
1103 Goto(2)
1104 EndIf
1105 Wait(1)
1106 EndLoop
1107 Goto(10)
1108 Return
1109 End
1110};
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
ApiStatus RandInt(Evt *script, b32 isInitialCall)
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#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 Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148

◆ EVS_TakeTurn

EvtScript battle::actor::spiked_goomba::EVS_TakeTurn

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

1246 {
1255 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
1260 Wait(1)
1262 Wait(5)
1266 Switch(LVar0)
1269 Set(LVarA, LVar0)
1272 Sub(LVar0, 10)
1273 Set(LVar1, 10)
1274 Add(LVar2, 3)
1277 Thread
1279 Set(LVar0, 0)
1280 Loop(16)
1284 Set(LVar1, LVar4)
1285 Set(LVar2, LVar5)
1286 Set(LVar3, LVar6)
1287 Wait(1)
1288 EndLoop
1289 EndThread
1290 Thread
1291 Wait(6)
1293 EndThread
1296 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1298 Wait(1)
1299 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
1301 Wait(1)
1302 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1305 Wait(5)
1308 EndIf
1309 Wait(5)
1314 Add(LVar0, 20)
1315 Set(LVar1, 0)
1318 Thread
1319 Wait(4)
1320 Set(LVar0, 180)
1321 Loop(4)
1322 Sub(LVar0, 45)
1324 Wait(1)
1325 EndLoop
1327 EndThread
1330 Wait(5)
1335 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1339 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1341 Wait(5)
1348 Return
1353 Thread
1355 Set(LVar0, 0)
1356 Loop(16)
1360 Set(LVar1, LVar4)
1361 Set(LVar2, LVar5)
1362 Set(LVar3, LVar6)
1363 Wait(1)
1364 EndLoop
1365 EndThread
1366 Thread
1367 Wait(6)
1369 EndThread
1372 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1373 Wait(1)
1374 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
1375 Wait(1)
1376 EndSwitch
1378 Switch(LVar0)
1382 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1383 Wait(1)
1384 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1385 Wait(1)
1390 Add(LVar0, 40)
1391 Set(LVar1, 0)
1395 Add(LVar0, 30)
1398 Add(LVar0, 20)
1402 IfGt(LVar0, 0)
1404 Wait(15)
1405 Else
1407 Wait(3)
1408 EndIf
1410 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1415 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1417 EndSwitch
1420 Return
1421 End
1422};
@ 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_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
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6407
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6406
@ ACTOR_PLAYER
Definition enums.h:2085
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4904
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#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 EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define LVar5
Definition macros.h:153
#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 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 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 LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151

◆ EVS_HandleEvent

EvtScript battle::actor::spiked_goomba::EVS_HandleEvent

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

1112 {
1115 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1117 Switch(LVar0)
1120 SetConst(LVar0, PRT_MAIN)
1125 SetConst(LVar0, PRT_MAIN)
1130 SetConst(LVar0, PRT_MAIN)
1134 SetConst(LVar0, PRT_MAIN)
1137 Return
1139 SetConst(LVar0, PRT_MAIN)
1143 SetConst(LVar0, PRT_MAIN)
1146 SetConst(LVar0, PRT_MAIN)
1149 Return
1151 SetConst(LVar0, PRT_MAIN)
1154 SetConst(LVar0, PRT_MAIN)
1158 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1163 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1164 Wait(5)
1169 SetConst(LVar0, PRT_MAIN)
1172 SetConst(LVar0, PRT_MAIN)
1175 Return
1180 SetConst(LVar0, PRT_MAIN)
1185 SetConst(LVar0, PRT_MAIN)
1188 Wait(10)
1189 SetConst(LVar0, PRT_MAIN)
1192 Return
1194 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1199 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1202 SetConst(LVar0, PRT_MAIN)
1206 SetConst(LVar0, PRT_MAIN)
1210 Return
1212 SetConst(LVar0, PRT_MAIN)
1216 SetConst(LVar0, PRT_MAIN)
1219 Return
1224 EndIf
1225 Wait(10)
1229 Add(LVar1, 10)
1230 Else
1231 Add(LVar1, 26)
1232 EndIf
1234 Wait(20)
1236 EndSwitch
1240 Return
1241 End
1242};
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ 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_SPIKE_TAUNT
Definition enums.h:2148
@ 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 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 ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
Definition macros.h:292
#define PlayEffect(args...)
Definition macros.h:807
#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::spiked_goomba::hp = 2
constexpr

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

◆ dmgSpikebonk

constexpr s32 battle::actor::spiked_goomba::dmgSpikebonk = 2
constexpr

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

◆ DefenseTable

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

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

983 {
986};

◆ StatusTable

s32 battle::actor::spiked_goomba::StatusTable[]
Initial value:
= {
}
@ 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_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 988 of file goomba_family.inc.cpp.

◆ ActorParts

ActorPartBlueprint battle::actor::spiked_goomba::ActorParts[]
Initial value:
= {
{
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
.opacity = 255,
.idleAnimations = DefaultAnims,
.defenseTable = DefenseTable,
.elementImmunityFlags = 0,
.projectileTargetOffset = { 0, -12 },
},
}
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362

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

1013 {
1014 {
1016 .index = PRT_MAIN,
1017 .posOffset = { 0, 0, 0 },
1018 .targetOffset = { 0, 24 },
1019 .opacity = 255,
1020 .idleAnimations = DefaultAnims,
1021 .defenseTable = DefenseTable,
1022 .eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
1023 .elementImmunityFlags = 0,
1024 .projectileTargetOffset = { 0, -12 },
1025 },
1026};

◆ ShuffleAnims