Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
paragoomba.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/Goomba.h"
6#include "sprite/npc/Paragoomba.h"
7
8#define NAMESPACE A(paragoomba)
9
10extern s32 N(DefaultAnims)[];
11extern s32 N(LeftWingAnims)[];
12extern s32 N(RightWingAnims)[];
13extern EvtScript N(EVS_Init);
14extern EvtScript N(EVS_Idle);
15extern EvtScript N(EVS_TakeTurn);
16extern EvtScript N(EVS_HandleEvent);
17extern EvtScript N(EVS_KnockDown);
18
19extern s32 A(downed_goomba_DefaultAnims)[];
20extern EvtScript A(downed_goomba_EVS_Init);
21
22enum N(ActorPartIDs) {
23 PRT_MAIN = 1, // body after being downed (must use same name as Goomba part #1)
24 PRT_FLYING = 2, // body while flying
25 PRT_DUMMY_WING_L = 3, // temporary wing while being downed
26 PRT_DUMMY_WING_R = 4, // temporary wing while being downed
27};
28
29enum N(ActorParams) {
30 DMG_AIR_KICK = 1,
31};
32
33s32 N(DownedDefense)[] = {
36};
37
38s32 N(FlyingDefense)[] = {
41};
42
43s32 N(DownedStatusTable)[] = {
50 STATUS_KEY_FEAR, 100,
54 STATUS_KEY_STOP, 100,
66};
67
68s32 N(FlyingStatusTable)[] = {
79 STATUS_KEY_STOP, 100,
91};
92
93ActorPartBlueprint N(ActorParts)[] = {
94 {
96 .index = PRT_MAIN,
97 .posOffset = { 0, 0, 0 },
98 .targetOffset = { 0, 20 },
99 .opacity = 255,
100 .idleAnimations = A(downed_goomba_DefaultAnims),
101 .defenseTable = N(DownedDefense),
102 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
103 .elementImmunityFlags = 0,
104 .projectileTargetOffset = { 0, -10 },
105 },
106 {
108 .index = PRT_FLYING,
109 .posOffset = { 0, 0, 0 },
110 .targetOffset = { 0, 24 },
111 .opacity = 255,
112 .idleAnimations = N(DefaultAnims),
113 .defenseTable = N(FlyingDefense),
114 .eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
115 .elementImmunityFlags = 0,
116 .projectileTargetOffset = { 0, -10 },
117 },
118 {
120 .index = PRT_DUMMY_WING_L,
121 .posOffset = { 0, 0, 0 },
122 .targetOffset = { -16, 24 },
123 .opacity = 255,
124 .idleAnimations = N(LeftWingAnims),
125 .defenseTable = N(DownedDefense),
126 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
127 .elementImmunityFlags = 0,
128 .projectileTargetOffset = { 0, -10 },
129 },
130 {
132 .index = PRT_DUMMY_WING_R,
133 .posOffset = { 0, 0, 0 },
134 .targetOffset = { -16, 24 },
135 .opacity = 255,
136 .idleAnimations = N(RightWingAnims),
137 .defenseTable = N(DownedDefense),
138 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
139 .elementImmunityFlags = 0,
140 .projectileTargetOffset = { 0, -10 },
141 },
142};
143
144ActorBlueprint NAMESPACE = {
145 .flags = ACTOR_FLAG_FLYING,
146 .type = ACTOR_TYPE_PARAGOOMBA,
147 .level = ACTOR_LEVEL_PARAGOOMBA,
148 .maxHP = 2,
149 .partCount = ARRAY_COUNT(N(ActorParts)),
150 .partsData = N(ActorParts),
151 .initScript = &N(EVS_Init),
152 .statusTable = N(FlyingStatusTable),
153 .escapeChance = 90,
154 .airLiftChance = 100,
155 .hurricaneChance = 100,
156 .spookChance = 100,
157 .upAndAwayChance = 95,
158 .spinSmashReq = 0,
159 .powerBounceChance = 100,
160 .coinReward = 1,
161 .size = { 36, 26 },
162 .healthBarOffset = { 0, 0 },
163 .statusIconOffset = { -10, 20 },
164 .statusTextOffset = { 10, 20 },
165};
166
167s32 N(DefaultAnims)[] = {
168 STATUS_KEY_NORMAL, ANIM_Paragoomba_Idle,
169 STATUS_KEY_STONE, ANIM_Paragoomba_Still,
170 STATUS_KEY_SLEEP, ANIM_Paragoomba_Sleep,
171 STATUS_KEY_POISON, ANIM_Paragoomba_Idle,
172 STATUS_KEY_STOP, ANIM_Paragoomba_Still,
173 STATUS_KEY_STATIC, ANIM_Paragoomba_Idle,
174 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Still,
175 STATUS_KEY_DIZZY, ANIM_Paragoomba_Dizzy,
176 STATUS_KEY_FEAR, ANIM_Paragoomba_Dizzy,
178};
179
180s32 N(ShuffleAnims)[] = {
181 STATUS_KEY_NORMAL, ANIM_Paragoomba_Run,
182 STATUS_KEY_STONE, ANIM_Paragoomba_Still,
183 STATUS_KEY_SLEEP, ANIM_Paragoomba_Sleep,
184 STATUS_KEY_POISON, ANIM_Paragoomba_Idle,
185 STATUS_KEY_STOP, ANIM_Paragoomba_Still,
186 STATUS_KEY_STATIC, ANIM_Paragoomba_Run,
187 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Still,
188 STATUS_KEY_DIZZY, ANIM_Paragoomba_Dizzy,
189 STATUS_KEY_FEAR, ANIM_Paragoomba_Dizzy,
191};
192
193s32 N(LeftWingAnims)[] = {
194 STATUS_KEY_NORMAL, ANIM_Paragoomba_LWingStill,
196};
197
198s32 N(RightWingAnims)[] = {
199 STATUS_KEY_NORMAL, ANIM_Paragoomba_RWingStill,
201};
202
203EvtScript N(EVS_Init) = {
204 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
205 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
206 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
207 Return
208 End
209};
210
211EvtScript N(EVS_Idle) = {
212 Label(10)
213 Call(RandInt, 80, LVar0)
214 Add(LVar0, 80)
215 Loop(LVar0)
216 Label(0)
217 Call(GetStatusFlags, ACTOR_SELF, LVar1)
219 Wait(1)
220 Goto(0)
221 EndIf
222 Wait(1)
223 EndLoop
224 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
225 Add(LVar0, 5)
226 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
227 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(ShuffleAnims)))
228 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
229 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
230 Loop(20)
231 Label(1)
232 Call(GetStatusFlags, ACTOR_SELF, LVar1)
234 Wait(1)
235 Goto(1)
236 EndIf
237 Wait(1)
238 EndLoop
239 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
240 Sub(LVar0, 5)
241 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
242 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
243 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
244 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(DefaultAnims)))
245 Loop(40)
246 Label(2)
247 Call(GetStatusFlags, ACTOR_SELF, LVar1)
249 Wait(1)
250 Goto(2)
251 EndIf
252 Wait(1)
253 EndLoop
254 Goto(10)
255 Return
256 End
257};
258
259EvtScript N(EVS_Paragoomba_GoHome) = {
260 Call(ResetAllActorSounds, ACTOR_SELF)
261 Call(SetGoalToHome, ACTOR_SELF)
262 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
263 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT)
264 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Idle)
265 Return
266 End
267};
268
269EvtScript N(EVS_HandleEvent) = {
270 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
271 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
272 Call(GetLastEvent, ACTOR_SELF, LVar0)
276 SetConst(LVar0, PRT_FLYING)
277 SetConst(LVar1, ANIM_Paragoomba_Hurt)
279 Call(GetBattlePhase, LVar0)
281 Call(GetEncounterTrigger, LVar0)
283 ExecWait(N(EVS_KnockDown))
284 EndIf
285 EndIf
288 SetConst(LVar0, PRT_FLYING)
289 SetConst(LVar1, ANIM_Paragoomba_BurnHurt)
290 SetConst(LVar2, ANIM_Paragoomba_BurnStill)
293 SetConst(LVar0, PRT_FLYING)
294 SetConst(LVar1, ANIM_Paragoomba_BurnHurt)
295 SetConst(LVar2, ANIM_Paragoomba_BurnStill)
297 SetConst(LVar0, PRT_FLYING)
298 SetConst(LVar1, ANIM_Paragoomba_BurnStill)
300 Return
302 SetConst(LVar0, PRT_FLYING)
303 SetConst(LVar1, ANIM_Paragoomba_Hurt)
305 ExecWait(N(EVS_KnockDown))
307 SetConst(LVar0, PRT_FLYING)
308 SetConst(LVar1, ANIM_Paragoomba_BurnHurt)
309 SetConst(LVar2, ANIM_Paragoomba_BurnStill)
311 ExecWait(N(EVS_KnockDown))
313 SetConst(LVar0, PRT_FLYING)
314 SetConst(LVar1, ANIM_Paragoomba_Electrocute)
316 SetConst(LVar0, PRT_FLYING)
317 SetConst(LVar1, ANIM_Paragoomba_Hurt)
319 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dizzy)
320 ExecWait(N(EVS_Paragoomba_GoHome))
322 SetConst(LVar0, PRT_FLYING)
323 SetConst(LVar1, ANIM_Paragoomba_Electrocute)
325 SetConst(LVar0, PRT_FLYING)
326 SetConst(LVar1, ANIM_Paragoomba_HurtStill)
328 Return
333 SetConst(LVar0, PRT_FLYING)
334 SetConst(LVar1, ANIM_Paragoomba_Idle)
338 SetConst(LVar0, PRT_FLYING)
339 SetConst(LVar1, ANIM_Paragoomba_Hurt)
341 Wait(10)
342 SetConst(LVar0, PRT_FLYING)
343 SetConst(LVar1, ANIM_Paragoomba_HurtStill)
345 Return
347 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
348 Call(HPBarToCurrent, ACTOR_SELF)
350 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run)
351 ExecWait(N(EVS_Paragoomba_GoHome))
352 Call(HPBarToHome, ACTOR_SELF)
354 SetConst(LVar0, PRT_FLYING)
355 SetConst(LVar1, ANIM_Paragoomba_Idle)
358 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
359 SetConst(LVar0, PRT_FLYING)
360 SetConst(LVar1, ANIM_Paragoomba_Run)
361 SetConst(LVar2, ANIM_Paragoomba_Hurt)
363 Return
365 SetConst(LVar0, PRT_FLYING)
366 SetConst(LVar1, ANIM_Paragoomba_Run)
369 SetConst(LVar0, PRT_FLYING)
370 SetConst(LVar1, ANIM_Paragoomba_Hurt)
372 Return
375 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
376 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
377 Return
378 End
379};
380
381EvtScript N(EVS_TakeTurn) = {
382 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
383 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
384 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
385 Call(SetGoalToTarget, ACTOR_SELF)
386 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
387 Call(BattleCamTargetActor, ACTOR_SELF)
388 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
389 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run)
390 Call(SetGoalToTarget, ACTOR_SELF)
391 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
392 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
393 Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR)
394 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
398 Set(LVarA, LVar0)
399 Wait(10)
400 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
401 Call(SetBattleCamDist, 300)
402 Call(BattleCamTargetActor, ACTOR_SELF)
403 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
404 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
405 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
406 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
407 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
408 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive)
409 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
410 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
411 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
412 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
414 Call(SetGoalToTarget, ACTOR_SELF)
415 Sub(LVar0, 80)
416 Set(LVar1, 20)
417 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
418 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
419 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive)
420 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT)
421 Thread
422 Loop(4)
423 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY)
424 Wait(4)
425 EndLoop
427 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Miss)
428 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
429 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0))
430 Wait(10)
432 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
433 EndIf
434 Wait(10)
435 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0))
436 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
437 Call(ResetAllActorSounds, ACTOR_SELF)
438 Call(YieldTurn)
439 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run)
440 Call(SetActorYaw, ACTOR_SELF, 180)
441 ExecWait(N(EVS_Paragoomba_GoHome))
442 Call(SetActorYaw, ACTOR_SELF, 0)
443 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
444 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
445 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
446 Return
449 Wait(10)
450 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
451 Call(SetBattleCamDist, 300)
452 Call(BattleCamTargetActor, ACTOR_SELF)
453 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
454 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
455 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
456 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
457 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
458 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive)
459 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
460 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
461 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
462 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
464 Call(SetGoalToTarget, ACTOR_SELF)
465 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
466 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive)
467 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
469 Wait(2)
470 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_AIR_KICK, BS_FLAGS1_TRIGGER_EVENTS)
474 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
475 Call(SetGoalToTarget, ACTOR_SELF)
476 Call(AddGoalPos, ACTOR_SELF, 50, 10, 0)
477 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
478 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run)
479 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
480 Call(ResetAllActorSounds, ACTOR_SELF)
481 Wait(5)
482 Call(YieldTurn)
483 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run)
484 ExecWait(N(EVS_Paragoomba_GoHome))
487 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
488 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
489 Return
490 End
491};
492
493#include "common/StartRumbleWithParams.inc.c"
494
495EvtScript N(EVS_KnockDown) = {
496 Call(HideHealthBar, ACTOR_SELF)
501 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
502 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2)
503 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2)
504 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2)
505 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2)
506 Call(GetLastEvent, ACTOR_SELF, LVar0)
508 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_BurnStill)
509 Else
510 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt)
511 EndIf
513 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
514 Set(LVar1, 0)
515 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
516 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
517 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
518 Call(N(StartRumbleWithParams), 100, 10)
519 Thread
520 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3))
522 Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
523 Call(GetLastEvent, ACTOR_SELF, LVar3)
525 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt)
526 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
527 Add(LVar4, 10)
528 Add(LVar5, 5)
529 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0)
530 EndIf
531 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
532 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
533 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
534 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
535 Loop(10)
536 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
537 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
538 Wait(1)
539 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE)
540 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE)
541 Wait(1)
542 EndLoop
543 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
544 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
545 Call(GetIndexFromHome, ACTOR_SELF, LVar0)
546 Mod(LVar0, 4)
547 Call(SetGoalToIndex, ACTOR_SELF, LVar0)
548 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
549 Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
550 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle)
551 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
552 Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable)))
553 Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GOOMBA)
554 ExecWait(A(downed_goomba_EVS_Init))
555 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
556 Call(HPBarToHome, ACTOR_SELF)
557 Call(ResetAllActorSounds, ACTOR_SELF)
558 Return
559 End
560};
561
562// downed paragoombas are handled via a special nested goomba import
563#define NESTED_GOOMBA_INCLUDE
564#define NAMESPACE A(downed_goomba)
565#include "goomba.inc.c"
Bytecode EvtScript[]
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_FLY
Definition enums.h:2035
@ ACTOR_SOUND_JUMP
Definition enums.h:2036
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ACTOR_EVENT_FLAG_GROUNDABLE
Actor can be knocked down from flight; triggered by jump attacks.
Definition enums.h:3382
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ ENCOUNTER_TRIGGER_HAMMER
Definition enums.h:271
@ 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
@ 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:4824
@ BTL_CAM_ENEMY_DIVE
Definition enums.h:4888
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4885
@ EASING_SIN_OUT
Definition enums.h:521
@ EASING_QUADRATIC_OUT
Definition enums.h:514
@ EASING_LINEAR
Definition enums.h:510
@ IDLE_SCRIPT_RESTART
Definition enums.h:6409
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ SOUND_PARAGOOMBA_FLY
Definition enums.h:1509
@ SOUND_NONE
Definition enums.h:547
@ SOUND_PARAGOOMBA_PREDIVE
Definition enums.h:1510
@ SOUND_FALL_QUICK
Definition enums.h:1090
@ SOUND_PARAGOOMBA_DIVE
Definition enums.h:1029
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
@ ACTOR_FLAG_TYPE_CHANGED
Indicates actors type has changed, triggers recheck for if HP bar should be shown based on tattle sta...
Definition enums.h:3332
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4905
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_BEGIN_FIRST_STRIKE
Definition enums.h:2173
@ EVENT_STAR_BEAM
Definition enums.h:2140
@ EVENT_END_FIRST_STRIKE
Definition enums.h:2171
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_FALL_TRIGGER
Definition enums.h:2134
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_15
Definition enums.h:2137
@ 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
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ ACTOR_PART_FLAG_NO_SHADOW
Definition enums.h:3352
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
Definition enums.h:3361
@ 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
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#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 Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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 Mod(VAR, INT_VALUE)
Definition macros.h:380
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define ARRAY_COUNT(arr)
Definition macros.h:40
#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 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 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 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 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 LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#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 Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#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