Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
paragloomba.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/Paragoomba.h"
4#include "sprite/npc/Goomba.h"
5#include "effects.h"
6
7#define NAMESPACE A(paragloomba)
8
9extern EvtScript N(EVS_Flying_Init);
10extern EvtScript N(EVS_Flying_Idle);
11extern EvtScript N(EVS_Flying_TakeTurn);
12extern EvtScript N(EVS_Flying_HandleEvent);
13extern EvtScript N(EVS_KnockDown);
14extern EvtScript N(EVS_Downed_Init);
15extern EvtScript N(EVS_Downed_Idle);
16extern EvtScript N(EVS_Downed_TakeTurn);
17extern EvtScript N(EVS_Downed_HandleEvent);
18
19extern s32 N(DownedAnims)[];
20extern s32 N(FlyingAnims)[];
21extern s32 N(LeftWingAnims)[];
22extern s32 N(RightWingAnims)[];
23
24enum N(ActorPartIDs) {
25 PRT_MAIN = 1, // body after being downed
26 PRT_FLYING = 2, // body while flying
27 PRT_DUMMY_WING_L = 3, // temporary wing while being downed
28 PRT_DUMMY_WING_R = 4, // temporary wing while being downed
29};
30
31enum N(ActorParams) {
32 DMG_SKY_DIVE = 2,
33 DMG_HEADBONK = 2,
34};
35
36s32 N(DownedDefense)[] = {
39};
40
41s32 N(FlyingDefense)[] = {
44};
45
46s32 N(DownedFlyingStatusTable)[] = {
53 STATUS_KEY_FEAR, 100,
69};
70
71s32 N(FlyingStatusTable)[] = {
94};
95
96ActorPartBlueprint N(ActorParts)[] = {
97 {
99 .index = PRT_MAIN,
100 .posOffset = { 0, 0, 0 },
101 .targetOffset = { 0, 20 },
102 .opacity = 255,
103 .idleAnimations = N(DownedAnims),
104 .defenseTable = N(DownedDefense),
105 .eventFlags = 0,
106 .elementImmunityFlags = 0,
107 .projectileTargetOffset = { 0, -10 },
108 },
109 {
111 .index = PRT_FLYING,
112 .posOffset = { 0, 0, 0 },
113 .targetOffset = { 0, 24 },
114 .opacity = 255,
115 .idleAnimations = N(FlyingAnims),
116 .defenseTable = N(FlyingDefense),
117 .eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
118 .elementImmunityFlags = 0,
119 .projectileTargetOffset = { 0, -10 },
120 },
121 {
123 .index = PRT_DUMMY_WING_L,
124 .posOffset = { 0, 0, 0 },
125 .targetOffset = { -16, 24 },
126 .opacity = 255,
127 .idleAnimations = N(LeftWingAnims),
128 .defenseTable = N(DownedDefense),
129 .eventFlags = 0,
130 .elementImmunityFlags = 0,
131 .projectileTargetOffset = { 0, -10 },
132 },
133 {
135 .index = PRT_DUMMY_WING_R,
136 .posOffset = { 0, 0, 0 },
137 .targetOffset = { -16, 24 },
138 .opacity = 255,
139 .idleAnimations = N(RightWingAnims),
140 .defenseTable = N(DownedDefense),
141 .eventFlags = 0,
142 .elementImmunityFlags = 0,
143 .projectileTargetOffset = { 0, -10 },
144 },
145};
146
147ActorBlueprint NAMESPACE = {
148 .flags = ACTOR_FLAG_FLYING,
149 .type = ACTOR_TYPE_PARAGLOOMBA,
150 .level = ACTOR_LEVEL_PARAGLOOMBA,
151 .maxHP = 7,
152 .partCount = ARRAY_COUNT(N(ActorParts)),
153 .partsData = N(ActorParts),
154 .initScript = &N(EVS_Flying_Init),
155 .statusTable = N(FlyingStatusTable),
156 .escapeChance = 65,
157 .airLiftChance = 95,
158 .hurricaneChance = 90,
159 .spookChance = 80,
160 .upAndAwayChance = 95,
161 .spinSmashReq = 0,
162 .powerBounceChance = 100,
163 .coinReward = 1,
164 .size = { 36, 26 },
165 .healthBarOffset = { 0, 0 },
166 .statusIconOffset = { -10, 20 },
167 .statusTextOffset = { 10, 20 },
168};
169
170s32 N(FlyingAnims)[] = {
171 STATUS_KEY_NORMAL, ANIM_Paragoomba_Dark_Idle,
172 STATUS_KEY_STONE, ANIM_Paragoomba_Dark_Still,
173 STATUS_KEY_SLEEP, ANIM_Paragoomba_Dark_Sleep,
174 STATUS_KEY_POISON, ANIM_Paragoomba_Dark_Idle,
175 STATUS_KEY_STOP, ANIM_Paragoomba_Dark_Still,
176 STATUS_KEY_STATIC, ANIM_Paragoomba_Dark_Idle,
177 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Dark_Still,
178 STATUS_KEY_DIZZY, ANIM_Paragoomba_Dark_Dizzy,
179 STATUS_KEY_FEAR, ANIM_Paragoomba_Dark_Dizzy,
181};
182
183s32 N(FlyingShuffleAnims)[] = {
184 STATUS_KEY_NORMAL, ANIM_Paragoomba_Dark_Run,
185 STATUS_KEY_STONE, ANIM_Paragoomba_Dark_Still,
186 STATUS_KEY_SLEEP, ANIM_Paragoomba_Dark_Sleep,
187 STATUS_KEY_POISON, ANIM_Paragoomba_Dark_Idle,
188 STATUS_KEY_STOP, ANIM_Paragoomba_Dark_Still,
189 STATUS_KEY_STATIC, ANIM_Paragoomba_Dark_Run,
190 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Dark_Still,
191 STATUS_KEY_DIZZY, ANIM_Paragoomba_Dark_Dizzy,
192 STATUS_KEY_FEAR, ANIM_Paragoomba_Dark_Dizzy,
194};
195
196s32 N(LeftWingAnims)[] = {
197 STATUS_KEY_NORMAL, ANIM_Paragoomba_Dark_LWingStill,
199};
200
201s32 N(RightWingAnims)[] = {
202 STATUS_KEY_NORMAL, ANIM_Paragoomba_Dark_RWingStill,
204};
205
206EvtScript N(EVS_Flying_Init) = {
207 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn)))
208 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Flying_Idle)))
209 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent)))
210 Return
211 End
212};
213
214EvtScript N(EVS_Flying_Idle) = {
215 Label(10)
216 Call(RandInt, 80, LVar0)
217 Add(LVar0, 80)
218 Loop(LVar0)
219 Label(0)
220 Call(GetStatusFlags, ACTOR_SELF, LVar1)
222 Wait(1)
223 Goto(0)
224 EndIf
225 Wait(1)
226 EndLoop
227 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
228 Add(LVar0, 5)
229 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
230 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims)))
231 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
232 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
233 Loop(20)
234 Label(1)
235 Call(GetStatusFlags, ACTOR_SELF, LVar1)
237 Wait(1)
238 Goto(1)
239 EndIf
240 Wait(1)
241 EndLoop
242 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
243 Sub(LVar0, 5)
244 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
245 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
246 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
247 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
248 Loop(40)
249 Label(2)
250 Call(GetStatusFlags, ACTOR_SELF, LVar1)
252 Wait(1)
253 Goto(2)
254 EndIf
255 Wait(1)
256 EndLoop
257 Goto(10)
258 Return
259 End
260};
261
262EvtScript N(EVS_ReturnHome) = {
263 Call(ResetAllActorSounds, ACTOR_SELF)
264 Call(SetGoalToHome, ACTOR_SELF)
265 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
266 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT)
267 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Idle)
268 Return
269 End
270};
271
272EvtScript N(EVS_Flying_HandleEvent) = {
273 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
274 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
275 Call(GetLastEvent, ACTOR_SELF, LVar0)
279 SetConst(LVar0, PRT_FLYING)
280 SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt)
282 Call(GetBattlePhase, LVar0)
284 Call(GetEncounterTrigger, LVar0)
286 ExecWait(N(EVS_KnockDown))
287 EndIf
288 EndIf
291 SetConst(LVar0, PRT_FLYING)
292 SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
293 SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill)
296 SetConst(LVar0, PRT_FLYING)
297 SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
298 SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill)
300 SetConst(LVar0, PRT_FLYING)
301 SetConst(LVar1, ANIM_Paragoomba_Dark_BurnStill)
303 Return
305 SetConst(LVar0, PRT_FLYING)
306 SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt)
308 ExecWait(N(EVS_KnockDown))
310 SetConst(LVar0, PRT_FLYING)
311 SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt)
312 SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill)
314 ExecWait(N(EVS_KnockDown))
316 SetConst(LVar0, PRT_FLYING)
317 SetConst(LVar1, ANIM_Paragoomba_Dark_Electrocute)
319 SetConst(LVar0, PRT_FLYING)
320 SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt)
322 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dizzy)
323 ExecWait(N(EVS_ReturnHome))
325 SetConst(LVar0, PRT_FLYING)
326 SetConst(LVar1, ANIM_Paragoomba_Dark_Electrocute)
328 SetConst(LVar0, PRT_FLYING)
329 SetConst(LVar1, ANIM_Paragoomba_Dark_HurtStill)
331 Return
336 SetConst(LVar0, PRT_FLYING)
337 SetConst(LVar1, ANIM_Paragoomba_Dark_Idle)
341 SetConst(LVar0, PRT_FLYING)
342 SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt)
344 Wait(10)
345 SetConst(LVar0, PRT_FLYING)
346 SetConst(LVar1, ANIM_Paragoomba_Dark_HurtStill)
348 Return
350 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
351 Call(HPBarToCurrent, ACTOR_SELF)
353 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run)
354 ExecWait(N(EVS_ReturnHome))
355 Call(HPBarToHome, ACTOR_SELF)
357 SetConst(LVar0, PRT_FLYING)
358 SetConst(LVar1, ANIM_Paragoomba_Dark_Idle)
361 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
362 SetConst(LVar0, PRT_FLYING)
363 SetConst(LVar1, ANIM_Paragoomba_Dark_Run)
364 SetConst(LVar2, ANIM_Paragoomba_Dark_Hurt)
366 Return
368 SetConst(LVar0, PRT_FLYING)
369 SetConst(LVar1, ANIM_Paragoomba_Dark_Run)
372 SetConst(LVar0, PRT_FLYING)
373 SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt)
375 Return
378 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
379 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
380 Return
381 End
382};
383
384EvtScript N(EVS_Flying_TakeTurn) = {
385 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
386 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
387 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
388 Call(SetGoalToTarget, ACTOR_SELF)
389 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
390 Call(BattleCamTargetActor, ACTOR_SELF)
391 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
392 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run)
393 Call(SetGoalToTarget, ACTOR_SELF)
394 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
395 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
396 Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR)
397 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS)
401 Set(LVarA, LVar0)
402 Wait(10)
403 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
404 Call(SetBattleCamDist, 300)
405 Call(BattleCamTargetActor, ACTOR_SELF)
406 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
407 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
408 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
409 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
410 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
411 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive)
412 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
413 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
414 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
415 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
417 Call(SetGoalToTarget, ACTOR_SELF)
418 Sub(LVar0, 80)
419 Set(LVar1, 20)
420 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
421 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
422 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive)
423 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT)
424 Thread
425 Loop(4)
426 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY)
427 Wait(4)
428 EndLoop
430 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Miss)
431 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
432 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0))
433 Wait(10)
435 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
436 EndIf
437 Wait(10)
438 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0))
439 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
440 Call(ResetAllActorSounds, ACTOR_SELF)
441 Call(YieldTurn)
442 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run)
443 Call(SetActorYaw, ACTOR_SELF, 180)
444 ExecWait(N(EVS_ReturnHome))
445 Call(SetActorYaw, ACTOR_SELF, 0)
446 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
447 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
448 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
449 Return
452 Wait(10)
453 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
454 Call(SetBattleCamDist, 300)
455 Call(BattleCamTargetActor, ACTOR_SELF)
456 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
457 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
458 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
459 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
460 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
461 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive)
462 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
463 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
464 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
465 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
467 Call(SetGoalToTarget, ACTOR_SELF)
468 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
469 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive)
470 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
472 Wait(2)
473 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS)
477 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
478 Call(SetGoalToTarget, ACTOR_SELF)
479 Call(AddGoalPos, ACTOR_SELF, 50, 10, 0)
480 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
481 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run)
482 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
483 Call(ResetAllActorSounds, ACTOR_SELF)
484 Wait(5)
485 Call(YieldTurn)
486 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run)
487 ExecWait(N(EVS_ReturnHome))
490 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
491 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
492 Return
493 End
494};
495
496#include "common/StartRumbleWithParams.inc.c"
497
498EvtScript N(EVS_KnockDown) = {
499 Call(HideHealthBar, ACTOR_SELF)
504 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
505 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2)
506 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2)
507 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2)
508 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2)
509 Call(GetLastEvent, ACTOR_SELF, LVar0)
511 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_BurnStill)
512 Else
513 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt)
514 EndIf
516 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
517 Set(LVar1, 0)
518 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
519 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
520 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
521 Call(N(StartRumbleWithParams), 100, 10)
522 Thread
523 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3))
525 Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
526 Call(GetLastEvent, ACTOR_SELF, LVar3)
527 IfEq(LVar3, 15)
528 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt)
529 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
530 Add(LVar4, 10)
531 Add(LVar5, 5)
532 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0)
533 EndIf
534 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
535 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
536 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
537 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
538 Loop(10)
539 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
540 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
541 Wait(1)
542 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE)
543 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE)
544 Wait(1)
545 EndLoop
546 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
547 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
548 Call(GetIndexFromHome, ACTOR_SELF, LVar0)
549 Mod(LVar0, 4)
550 Call(SetGoalToIndex, ACTOR_SELF, LVar0)
551 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
552 Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
553 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
554 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
555 Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedFlyingStatusTable)))
556 Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GLOOMBA)
557 ExecWait(N(EVS_Downed_Init))
558 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
559 Call(HPBarToHome, ACTOR_SELF)
560 Call(ResetAllActorSounds, ACTOR_SELF)
561 Return
562 End
563};
564
565s32 N(DownedAnims)[] = {
566 STATUS_KEY_NORMAL, ANIM_Goomba_Dark_Idle,
567 STATUS_KEY_STONE, ANIM_Goomba_Dark_Still,
568 STATUS_KEY_SLEEP, ANIM_Goomba_Dark_Sleep,
569 STATUS_KEY_POISON, ANIM_Goomba_Dark_Idle,
570 STATUS_KEY_STOP, ANIM_Goomba_Dark_Still,
571 STATUS_KEY_STATIC, ANIM_Goomba_Dark_Idle,
572 STATUS_KEY_PARALYZE, ANIM_Goomba_Dark_Still,
573 STATUS_KEY_DIZZY, ANIM_Goomba_Dark_Dizzy,
574 STATUS_KEY_FEAR, ANIM_Goomba_Dark_Dizzy,
576};
577
578s32 N(DownedShuffleAnims)[] = {
579 STATUS_KEY_NORMAL, ANIM_Goomba_Dark_Run,
580 STATUS_KEY_STONE, ANIM_Goomba_Dark_Still,
581 STATUS_KEY_SLEEP, ANIM_Goomba_Dark_Sleep,
582 STATUS_KEY_POISON, ANIM_Goomba_Dark_Idle,
583 STATUS_KEY_STOP, ANIM_Goomba_Dark_Still,
584 STATUS_KEY_STATIC, ANIM_Goomba_Dark_Run,
585 STATUS_KEY_PARALYZE, ANIM_Goomba_Dark_Still,
586 STATUS_KEY_DIZZY, ANIM_Goomba_Dark_Dizzy,
587 STATUS_KEY_FEAR, ANIM_Goomba_Dark_Dizzy,
589};
590
591EvtScript N(EVS_Downed_Init) = {
592 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn)))
593 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle)))
594 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent)))
595 Return
596 End
597};
598
599EvtScript N(EVS_Downed_Idle) = {
600 Label(10)
601 Call(RandInt, 80, LVar0)
602 Add(LVar0, 80)
603 Loop(LVar0)
604 Label(0)
605 Call(GetStatusFlags, ACTOR_SELF, LVar1)
607 Wait(1)
608 Goto(0)
609 EndIf
610 Wait(1)
611 EndLoop
612 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
613 Add(LVar0, 5)
614 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
615 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims)))
616 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
617 Call(IdleRunToGoal, ACTOR_SELF, 0)
618 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
619 Loop(20)
620 Label(1)
621 Call(GetStatusFlags, ACTOR_SELF, LVar1)
623 Wait(1)
624 Goto(1)
625 EndIf
626 Wait(1)
627 EndLoop
628 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
629 Sub(LVar0, 5)
630 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
631 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims)))
632 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
633 Call(IdleRunToGoal, ACTOR_SELF, 0)
634 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
635 Loop(80)
636 Label(2)
637 Call(GetStatusFlags, ACTOR_SELF, LVar1)
639 Wait(1)
640 Goto(2)
641 EndIf
642 Wait(1)
643 EndLoop
644 Goto(10)
645 Return
646 End
647};
648
649EvtScript N(EVS_Downed_HandleEvent) = {
650 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
651 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
652 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
653 Call(GetLastEvent, ACTOR_SELF, LVar0)
657 SetConst(LVar0, PRT_MAIN)
658 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
662 SetConst(LVar0, PRT_MAIN)
663 SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt)
664 SetConst(LVar2, ANIM_Goomba_Dark_BurnStill)
667 SetConst(LVar0, PRT_MAIN)
668 SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt)
669 SetConst(LVar2, ANIM_Goomba_Dark_BurnStill)
671 SetConst(LVar0, PRT_MAIN)
672 SetConst(LVar1, ANIM_Goomba_Dark_BurnStill)
674 Return
676 SetConst(LVar0, PRT_MAIN)
677 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
680 SetConst(LVar0, PRT_MAIN)
681 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
683 SetConst(LVar0, PRT_MAIN)
684 SetConst(LVar1, ANIM_Goomba_Dark_Dead)
686 Return
688 SetConst(LVar0, PRT_MAIN)
689 SetConst(LVar1, ANIM_Goomba_Dark_Electrocute)
691 SetConst(LVar0, PRT_MAIN)
692 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
694 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
695 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
696 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy)
697 Call(SetGoalToHome, ACTOR_SELF)
698 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
699 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
700 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
701 Wait(5)
702 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
703 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
704 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
706 SetConst(LVar0, PRT_MAIN)
707 SetConst(LVar1, ANIM_Goomba_Dark_Electrocute)
709 SetConst(LVar0, PRT_MAIN)
710 SetConst(LVar1, ANIM_Goomba_Dark_Dead)
712 Return
717 SetConst(LVar0, PRT_MAIN)
718 SetConst(LVar1, ANIM_Goomba_Dark_Idle)
722 SetConst(LVar0, PRT_MAIN)
723 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
725 Wait(10)
726 SetConst(LVar0, PRT_MAIN)
727 SetConst(LVar1, ANIM_Goomba_Dark_Dead)
729 Return
731 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
732 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run)
733 Call(SetGoalToHome, ACTOR_SELF)
734 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
735 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
736 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
737 Call(HPBarToHome, ACTOR_SELF)
739 SetConst(LVar0, PRT_MAIN)
740 SetConst(LVar1, ANIM_Goomba_Dark_Idle)
743 SetConst(LVar0, PRT_MAIN)
744 SetConst(LVar1, ANIM_Goomba_Dark_Run)
745 SetConst(LVar2, ANIM_Goomba_Dark_Hurt)
747 Return
749 SetConst(LVar0, PRT_MAIN)
750 SetConst(LVar1, ANIM_Goomba_Dark_Run)
753 SetConst(LVar0, PRT_MAIN)
754 SetConst(LVar1, ANIM_Goomba_Dark_Hurt)
756 Return
759 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
760 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
761 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
762 Return
763 End
764};
765
766#include "common/CalculateArcsinDeg.inc.c"
767
768EvtScript N(EVS_Downed_TakeTurn) = {
769 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
770 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
771 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
772 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
773 Call(BattleCamTargetActor, ACTOR_SELF)
774 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
775 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run)
776 Call(SetGoalToTarget, ACTOR_SELF)
777 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
778 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
779 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
780 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
781 Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
782 Wait(1)
783 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
784 Wait(5)
785 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
786 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair)
787 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
791 Set(LVarA, LVar0)
792 Call(SetGoalToTarget, ACTOR_SELF)
793 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
794 Sub(LVar0, 10)
795 Set(LVar1, 10)
796 Add(LVar2, 3)
797 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
798 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
799 Thread
800 Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
801 Set(LVar0, 0)
802 Loop(16)
803 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
804 Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0)
805 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
806 Set(LVar1, LVar4)
807 Set(LVar2, LVar5)
808 Set(LVar3, LVar6)
809 Wait(1)
810 EndLoop
812 Thread
813 Wait(6)
814 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair)
816 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
817 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Sleep)
818 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
819 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
820 Wait(1)
821 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
822 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
823 Wait(1)
824 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
825 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
826 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt)
827 Wait(5)
829 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
830 EndIf
831 Wait(5)
832 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
833 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair)
834 Call(SetGoalToTarget, ACTOR_SELF)
835 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
836 Add(LVar0, 20)
837 Set(LVar1, 0)
838 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
839 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
840 Thread
841 Wait(4)
842 Set(LVar0, 180)
843 Loop(4)
844 Sub(LVar0, 45)
845 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
846 Wait(1)
847 EndLoop
848 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair)
850 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
851 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy)
852 Wait(5)
853 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
854 Call(YieldTurn)
855 Call(SetActorYaw, ACTOR_SELF, 180)
856 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
857 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
858 Call(SetGoalToHome, ACTOR_SELF)
859 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
860 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
861 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
862 Call(SetActorYaw, ACTOR_SELF, 0)
863 Wait(5)
864 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
865 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
866 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
867 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
868 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
869 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
870 Return
873 Call(SetGoalToTarget, ACTOR_SELF)
874 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
875 Thread
876 Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
877 Set(LVar0, 0)
878 Loop(16)
879 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
880 Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0)
881 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
882 Set(LVar1, LVar4)
883 Set(LVar2, LVar5)
884 Set(LVar3, LVar6)
885 Wait(1)
886 EndLoop
888 Thread
889 Wait(6)
890 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair)
892 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
893 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Tense)
894 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
895 Wait(1)
896 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
897 Wait(1)
899 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS)
903 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
904 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
905 Wait(1)
906 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
907 Wait(1)
908 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
909 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
910 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
911 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
912 Add(LVar0, 40)
913 Set(LVar1, 0)
914 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
915 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
916 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
917 Add(LVar0, 30)
918 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
919 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
920 Add(LVar0, 20)
921 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
922 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
923 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle)
924 Wait(3)
925 Call(YieldTurn)
926 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
927 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run)
928 Call(SetGoalToHome, ACTOR_SELF)
929 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
930 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
931 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
934 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
935 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
936 Return
937 End
938};
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_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_ENABLE
Definition enums.h:6408
@ 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_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ 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_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
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 LVar6
Definition macros.h:154
#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 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