Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
hyper_paragoomba.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/Goomba.h"
4#include "sprite/npc/Paragoomba.h"
5
6#define NAMESPACE A(hyper_paragoomba)
7
8extern s32 N(FlyingAnims)[];
9extern s32 N(LeftWingAnims)[];
10extern s32 N(RightWingAnims)[];
11extern s32 N(DownedAnims)[];
12
13extern EvtScript N(EVS_Init);
14extern EvtScript N(EVS_Idle);
15extern EvtScript N(EVS_HandleEvent);
16extern EvtScript N(EVS_HandlePhase);
17extern EvtScript N(EVS_Flying_HandlePhase);
18extern EvtScript N(EVS_Flying_TakeTurn);
19extern EvtScript N(EVS_Attack_SkyDive);
20extern EvtScript N(EVS_ReturnHome);
21extern EvtScript N(EVS_KnockDown);
22extern EvtScript N(EVS_KnockDown_Init);
23extern EvtScript N(EVS_Downed_Idle);
24extern EvtScript N(EVS_Downed_HandleEvent);
25extern EvtScript N(EVS_Downed_TakeTurn);
26extern EvtScript N(EVS_Attack_Headbonk);
27
28enum N(ActorPartIDs) {
29 PRT_MAIN = 1, // body after being downed
30 PRT_FLYING = 2, // body while flying
31 PRT_DUMMY_WING_L = 3, // temporary wing while being downed
32 PRT_DUMMY_WING_R = 4, // temporary wing while being downed
33};
34
35enum N(ActorVars) {
36 AVAR_IsCharged = 0,
37 AVAR_NotFirstTurn = 1,
38};
39
40enum N(ActorParams) {
41 DMG_SKY_DIVE = 1,
42 DMG_CHARGED_DIVE = 8,
43 DMG_HEADBONK = 1,
44 DMG_CHARGED_BONK = 8,
45};
46
47s32 N(DownedDefense)[] = {
50};
51
52s32 N(FlyingDefense)[] = {
55};
56
57s32 N(DownedStatusTable)[] = {
64 STATUS_KEY_FEAR, 100,
80};
81
82s32 N(FlyingStatusTable)[] = {
105};
106
107ActorPartBlueprint N(ActorParts)[] = {
108 {
110 .index = PRT_MAIN,
111 .posOffset = { 0, 0, 0 },
112 .targetOffset = { 0, 22 },
113 .opacity = 255,
114 .idleAnimations = N(DownedAnims),
115 .defenseTable = N(DownedDefense),
116 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
117 .elementImmunityFlags = 0,
118 .projectileTargetOffset = { 0, -10 },
119 },
120 {
122 .index = PRT_FLYING,
123 .posOffset = { 0, 0, 0 },
124 .targetOffset = { 0, 24 },
125 .opacity = 255,
126 .idleAnimations = N(FlyingAnims),
127 .defenseTable = N(FlyingDefense),
128 .eventFlags = ACTOR_EVENT_FLAG_GROUNDABLE,
129 .elementImmunityFlags = 0,
130 .projectileTargetOffset = { 0, -10 },
131 },
132 {
134 .index = PRT_DUMMY_WING_L,
135 .posOffset = { 0, 0, 0 },
136 .targetOffset = { -16, 24 },
137 .opacity = 255,
138 .idleAnimations = N(LeftWingAnims),
139 .defenseTable = N(DownedDefense),
140 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
141 .elementImmunityFlags = 0,
142 .projectileTargetOffset = { 0, -10 },
143 },
144 {
146 .index = PRT_DUMMY_WING_R,
147 .posOffset = { 0, 0, 0 },
148 .targetOffset = { -16, 24 },
149 .opacity = 255,
150 .idleAnimations = N(RightWingAnims),
151 .defenseTable = N(DownedDefense),
152 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
153 .elementImmunityFlags = 0,
154 .projectileTargetOffset = { 0, -10 },
155 },
156};
157
158ActorBlueprint NAMESPACE = {
159 .flags = ACTOR_FLAG_FLYING,
160 .type = ACTOR_TYPE_HYPER_PARAGOOMBA,
161 .level = ACTOR_LEVEL_HYPER_PARAGOOMBA,
162 .maxHP = 7,
163 .partCount = ARRAY_COUNT(N(ActorParts)),
164 .partsData = N(ActorParts),
165 .initScript = &N(EVS_Init),
166 .statusTable = N(FlyingStatusTable),
167 .escapeChance = 50,
168 .airLiftChance = 95,
169 .hurricaneChance = 95,
170 .spookChance = 80,
171 .upAndAwayChance = 95,
172 .spinSmashReq = 0,
173 .powerBounceChance = 90,
174 .coinReward = 1,
175 .size = { 36, 26 },
176 .healthBarOffset = { 0, 0 },
177 .statusIconOffset = { -10, 20 },
178 .statusTextOffset = { 10, 20 },
179};
180
181s32 N(ChargedFlyingAnims)[] = {
182 STATUS_KEY_NORMAL, ANIM_Paragoomba_Hyper_Miss,
183 STATUS_KEY_STONE, ANIM_Paragoomba_Hyper_Still,
184 STATUS_KEY_SLEEP, ANIM_Paragoomba_Hyper_Sleep,
185 STATUS_KEY_POISON, ANIM_Paragoomba_Hyper_Miss,
186 STATUS_KEY_STOP, ANIM_Paragoomba_Hyper_Still,
187 STATUS_KEY_STATIC, ANIM_Paragoomba_Hyper_Miss,
188 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Hyper_Still,
189 STATUS_KEY_DIZZY, ANIM_Paragoomba_Hyper_Dizzy,
190 STATUS_KEY_FEAR, ANIM_Paragoomba_Hyper_Dizzy,
192};
193
194EvtScript N(EVS_Init) = {
195 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
196 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
197 Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_Flying_HandlePhase)))
198 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn)))
199 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
200 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE)
201 Return
202 End
203};
204
205EvtScript N(EVS_Flying_HandlePhase) = {
206 Call(GetBattlePhase, LVar0)
212 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE)
214 Return
215 End
216};
217
218EvtScript N(EVS_Attack_ChargedDive) = {
219 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
220 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
221 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
222 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
223 IfEq(LVar0, 0)
224 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
225 Call(BattleCamTargetActor, ACTOR_SELF)
226 Call(MoveBattleCamOver, 20)
227 Wait(20)
228 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP)
229 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
230 Add(LVar1, 10)
231 PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0)
232 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss)
233 Wait(30)
234 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
235 Call(MoveBattleCamOver, 20)
236 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
237 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
238 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
239 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE)
240 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE)
241 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(ChargedFlyingAnims)))
242 Call(EnableActorGlow, ACTOR_SELF, TRUE)
243 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE)
244 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
245 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
246 Return
247 EndIf
248 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
249 Call(BattleCamTargetActor, ACTOR_SELF)
250 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
251 Call(MoveBattleCamOver, 30)
252 Loop(20)
253 Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
254 Wait(1)
255 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
256 Wait(1)
257 EndLoop
258 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
259 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
260 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
261 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
262 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
263 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
264 Add(LVar1, 20)
265 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
266 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
267 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
268 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
269 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
273 Set(LVarA, LVar0)
274 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
275 Call(SetActorRotation, ACTOR_SELF, 0, 0, -60)
276 Thread
277 Set(LVar0, -60)
278 Loop(60)
279 Add(LVar0, 19)
280 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
281 Wait(1)
282 EndLoop
284 Call(SetGoalToTarget, ACTOR_SELF)
285 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
286 Set(LVar1, 0)
287 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
288 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
289 Call(SetActorSpeed, ACTOR_SELF, Float(15.0))
290 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE)
291 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
292 Call(ResetAllActorSounds, ACTOR_SELF)
293 Call(AddGoalPos, ACTOR_SELF, -60, 0, 0)
294 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3))
295 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
297 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
298 EndIf
299 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
300 Call(AddGoalPos, ACTOR_SELF, -200, 0, 0)
301 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
302 Wait(20)
303 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
304 Call(YieldTurn)
305 Call(EnableActorGlow, ACTOR_SELF, FALSE)
306 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
307 Thread
308 Set(LVar0, 0)
309 Loop(30)
310 Add(LVar0, 24)
311 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
312 Wait(1)
313 EndLoop
314 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
315 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
317 Call(SetActorPos, ACTOR_SELF, 300, 0, 0)
318 Call(SetGoalToHome, ACTOR_SELF)
319 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
320 Call(AddGoalPos, ACTOR_SELF, 30, 0, 0)
321 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
322 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
323 Call(ResetAllActorSounds, ACTOR_SELF)
324 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
325 Call(SetGoalToHome, ACTOR_SELF)
326 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
327 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT)
328 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle)
329 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
330 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
331 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
332 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
333 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
334 Return
337 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
338 Call(SetActorRotation, ACTOR_SELF, 0, 0, -70)
339 Call(SetGoalToTarget, ACTOR_SELF)
340 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
341 Call(SetActorSpeed, ACTOR_SELF, Float(15.0))
342 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE)
343 Wait(2)
344 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_DIVE, BS_FLAGS1_TRIGGER_EVENTS)
348 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
349 Call(ResetAllActorSounds, ACTOR_SELF)
350 Thread
351 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
352 Set(LVar0, -70)
353 Loop(60)
354 Add(LVar0, 18)
355 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
356 Wait(1)
357 EndLoop
358 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
359 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
361 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
362 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
363 Set(LVar1, 0)
364 Sub(LVar0, 70)
365 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
366 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE)
367 Sub(LVar0, 60)
368 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
369 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE)
370 Wait(20)
371 Call(YieldTurn)
372 Call(EnableActorGlow, ACTOR_SELF, FALSE)
373 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
374 Call(SetActorYaw, ACTOR_SELF, 180)
375 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
376 ExecWait(N(EVS_ReturnHome))
377 Call(SetActorYaw, ACTOR_SELF, 0)
378 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
379 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
382 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
383 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
384 Return
385 End
386};
387
388EvtScript N(EVS_Flying_TakeTurn) = {
389 Call(GetBattlePhase, LVar0)
392 ExecWait(N(EVS_Attack_SkyDive))
393 Return
394 EndIf
395 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
396 IfEq(LVar0, 1)
397 ExecWait(N(EVS_Attack_ChargedDive))
398 Return
399 EndIf
400 Call(GetBattleVar, BTL_VAR_HyperSync, LVar0)
402 CaseEq(0)
403 Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0)
404 IfEq(LVar0, 0)
405 Call(RandInt, 1000, LVar0)
406 IfLt(LVar0, 750)
408 ExecWait(N(EVS_Attack_ChargedDive))
409 Else
411 ExecWait(N(EVS_Attack_SkyDive))
412 EndIf
413 Else
414 Call(RandInt, 1000, LVar0)
415 IfLt(LVar0, 500)
417 ExecWait(N(EVS_Attack_ChargedDive))
418 Else
420 ExecWait(N(EVS_Attack_SkyDive))
421 EndIf
422 EndIf
423 CaseEq(1)
424 ExecWait(N(EVS_Attack_SkyDive))
425 CaseEq(2)
426 ExecWait(N(EVS_Attack_ChargedDive))
428 Return
429 End
430};
431
432s32 N(FlyingAnims)[] = {
433 STATUS_KEY_NORMAL, ANIM_Paragoomba_Hyper_Idle,
434 STATUS_KEY_STONE, ANIM_Paragoomba_Hyper_Still,
435 STATUS_KEY_SLEEP, ANIM_Paragoomba_Hyper_Sleep,
436 STATUS_KEY_POISON, ANIM_Paragoomba_Hyper_Idle,
437 STATUS_KEY_STOP, ANIM_Paragoomba_Hyper_Still,
438 STATUS_KEY_STATIC, ANIM_Paragoomba_Hyper_Idle,
439 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Hyper_Still,
440 STATUS_KEY_DIZZY, ANIM_Paragoomba_Hyper_Dizzy,
441 STATUS_KEY_FEAR, ANIM_Paragoomba_Hyper_Dizzy,
443};
444
445s32 N(FlyingShuffleAnims)[] = {
446 STATUS_KEY_NORMAL, ANIM_Paragoomba_Hyper_Run,
447 STATUS_KEY_STONE, ANIM_Paragoomba_Hyper_Still,
448 STATUS_KEY_SLEEP, ANIM_Paragoomba_Hyper_Sleep,
449 STATUS_KEY_POISON, ANIM_Paragoomba_Hyper_Idle,
450 STATUS_KEY_STOP, ANIM_Paragoomba_Hyper_Still,
451 STATUS_KEY_STATIC, ANIM_Paragoomba_Hyper_Run,
452 STATUS_KEY_PARALYZE, ANIM_Paragoomba_Hyper_Still,
453 STATUS_KEY_DIZZY, ANIM_Paragoomba_Hyper_Dizzy,
454 STATUS_KEY_FEAR, ANIM_Paragoomba_Hyper_Dizzy,
456};
457
458s32 N(LeftWingAnims)[] = {
459 STATUS_KEY_NORMAL, ANIM_Paragoomba_Hyper_LWingStill,
461};
462
463s32 N(RightWingAnims)[] = {
464 STATUS_KEY_NORMAL, ANIM_Paragoomba_Hyper_RWingStill,
466};
467
468EvtScript N(EVS_Flying_Init_Unused) = {
469 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Attack_SkyDive)))
470 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
471 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
472 Return
473 End
474};
475
476EvtScript N(EVS_Idle) = {
477 Label(10)
478 Call(RandInt, 80, LVar0)
479 Add(LVar0, 80)
480 Loop(LVar0)
481 Label(0)
482 Call(GetStatusFlags, ACTOR_SELF, LVar1)
484 Wait(1)
485 Goto(0)
486 EndIf
487 Wait(1)
488 EndLoop
489 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
490 Add(LVar0, 5)
491 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
492 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims)))
493 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
494 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
495 Loop(20)
496 Label(1)
497 Call(GetStatusFlags, ACTOR_SELF, LVar1)
499 Wait(1)
500 Goto(1)
501 EndIf
502 Wait(1)
503 EndLoop
504 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
505 Sub(LVar0, 5)
506 Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6))
507 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
508 Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR)
509 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
510 Loop(40)
511 Label(2)
512 Call(GetStatusFlags, ACTOR_SELF, LVar1)
514 Wait(1)
515 Goto(2)
516 EndIf
517 Wait(1)
518 EndLoop
519 Goto(10)
520 Return
521 End
522};
523
524EvtScript N(EVS_ReturnHome) = {
525 Call(ResetAllActorSounds, ACTOR_SELF)
526 Call(SetGoalToHome, ACTOR_SELF)
527 Call(SetActorSpeed, ACTOR_SELF, Float(7.0))
528 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT)
529 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle)
530 Return
531 End
532};
533
534EvtScript N(EVS_HandleEvent) = {
535 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
536 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
537 Call(GetLastEvent, ACTOR_SELF, LVar0)
541 SetConst(LVar0, PRT_FLYING)
542 SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt)
544 Call(GetBattlePhase, LVar0)
546 Call(GetEncounterTrigger, LVar0)
548 ExecWait(N(EVS_KnockDown))
549 EndIf
550 EndIf
553 SetConst(LVar0, PRT_FLYING)
554 SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt)
555 SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill)
558 SetConst(LVar0, PRT_FLYING)
559 SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt)
560 SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill)
562 SetConst(LVar0, PRT_FLYING)
563 SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnStill)
565 Return
567 SetConst(LVar0, PRT_FLYING)
568 SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt)
570 ExecWait(N(EVS_KnockDown))
572 SetConst(LVar0, PRT_FLYING)
573 SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt)
574 SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill)
576 ExecWait(N(EVS_KnockDown))
578 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
579 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
580 Call(EnableActorGlow, ACTOR_SELF, FALSE)
581 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
582 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
583 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
584 SetConst(LVar0, PRT_FLYING)
585 SetConst(LVar1, ANIM_Paragoomba_Hyper_Electrocute)
587 SetConst(LVar0, PRT_FLYING)
588 SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt)
590 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dizzy)
591 ExecWait(N(EVS_ReturnHome))
593 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
594 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
595 Call(EnableActorGlow, ACTOR_SELF, FALSE)
596 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
597 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
598 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
599 SetConst(LVar0, PRT_FLYING)
600 SetConst(LVar1, ANIM_Paragoomba_Hyper_Electrocute)
602 SetConst(LVar0, PRT_FLYING)
603 SetConst(LVar1, ANIM_Paragoomba_Hyper_HurtStill)
605 Return
607 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
608 IfEq(LVar0, 1)
609 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
610 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
611 Call(EnableActorGlow, ACTOR_SELF, FALSE)
612 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
613 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
614 Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims)))
615 EndIf
616 SetConst(LVar0, PRT_FLYING)
617 SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle)
622 SetConst(LVar0, PRT_FLYING)
623 SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle)
627 SetConst(LVar0, PRT_FLYING)
628 SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt)
630 Wait(10)
631 SetConst(LVar0, PRT_FLYING)
632 SetConst(LVar1, ANIM_Paragoomba_Hyper_HurtStill)
634 Return
636 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
637 Call(HPBarToCurrent, ACTOR_SELF)
639 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
640 ExecWait(N(EVS_ReturnHome))
641 Call(HPBarToHome, ACTOR_SELF)
643 SetConst(LVar0, PRT_FLYING)
644 SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle)
647 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
648 SetConst(LVar0, PRT_FLYING)
649 SetConst(LVar1, ANIM_Paragoomba_Hyper_Run)
650 SetConst(LVar2, ANIM_Paragoomba_Hyper_Hurt)
652 Return
654 SetConst(LVar0, PRT_FLYING)
655 SetConst(LVar1, ANIM_Paragoomba_Hyper_Run)
658 SetConst(LVar0, PRT_FLYING)
659 SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt)
661 Return
664 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
665 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
666 Return
667 End
668};
669
670EvtScript N(EVS_Attack_SkyDive) = {
671 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
672 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
673 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
674 Call(SetGoalToTarget, ACTOR_SELF)
675 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
676 Call(BattleCamTargetActor, ACTOR_SELF)
677 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
678 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
679 Call(SetGoalToTarget, ACTOR_SELF)
680 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
681 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
682 Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR)
683 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
687 Set(LVarA, LVar0)
688 Wait(10)
689 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
690 Call(SetBattleCamDist, 300)
691 Call(BattleCamTargetActor, ACTOR_SELF)
692 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
693 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
694 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
695 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
696 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
697 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive)
698 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
699 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
700 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
701 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
703 Call(SetGoalToTarget, ACTOR_SELF)
704 Sub(LVar0, 80)
705 Set(LVar1, 20)
706 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
707 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
708 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive)
709 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT)
710 Thread
711 Loop(4)
712 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY)
713 Wait(4)
714 EndLoop
716 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss)
717 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
718 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0))
719 Wait(10)
721 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
722 EndIf
723 Wait(10)
724 Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0))
725 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
726 Call(ResetAllActorSounds, ACTOR_SELF)
727 Call(YieldTurn)
728 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
729 Call(SetActorYaw, ACTOR_SELF, 180)
730 ExecWait(N(EVS_ReturnHome))
731 Call(SetActorYaw, ACTOR_SELF, 0)
732 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
733 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
734 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
735 Return
738 Wait(10)
739 Call(UseBattleCamPreset, BTL_CAM_ENEMY_DIVE)
740 Call(SetBattleCamDist, 300)
741 Call(BattleCamTargetActor, ACTOR_SELF)
742 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
743 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE)
744 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
745 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
746 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
747 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive)
748 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
749 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
750 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE)
751 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE)
753 Call(SetGoalToTarget, ACTOR_SELF)
754 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
755 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive)
756 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
758 Wait(2)
759 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS)
763 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
764 Call(SetGoalToTarget, ACTOR_SELF)
765 Call(AddGoalPos, ACTOR_SELF, 50, 10, 0)
766 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
767 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
768 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR)
769 Call(ResetAllActorSounds, ACTOR_SELF)
770 Wait(5)
771 Call(YieldTurn)
772 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run)
773 ExecWait(N(EVS_ReturnHome))
776 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
777 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
778 Return
779 End
780};
781
782#include "common/StartRumbleWithParams.inc.c"
783
784EvtScript N(EVS_KnockDown) = {
785 Call(HideHealthBar, ACTOR_SELF)
790 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
791 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2)
792 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2)
793 Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2)
794 Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2)
795 Call(GetLastEvent, ACTOR_SELF, LVar0)
797 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_BurnStill)
798 Else
799 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt)
800 EndIf
802 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
803 Set(LVar1, 0)
804 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
805 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
806 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
807 Call(N(StartRumbleWithParams), 100, 10)
808 Thread
809 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3))
811 Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
812 Call(GetLastEvent, ACTOR_SELF, LVar3)
814 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt)
815 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
816 Add(LVar4, 10)
817 Add(LVar5, 5)
818 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0)
819 EndIf
820 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
821 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
822 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
823 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
824 Loop(10)
825 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
826 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
827 Wait(1)
828 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE)
829 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE)
830 Wait(1)
831 EndLoop
832 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE)
833 Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE)
834 Call(GetIndexFromHome, ACTOR_SELF, LVar0)
835 Mod(LVar0, 4)
836 Call(SetGoalToIndex, ACTOR_SELF, LVar0)
837 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
838 Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
839 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
840 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
841 Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable)))
842 Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_HYPER_GOOMBA)
843 ExecWait(N(EVS_KnockDown_Init))
844 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
845 Call(HPBarToHome, ACTOR_SELF)
846 Call(ResetAllActorSounds, ACTOR_SELF)
847 Return
848 End
849};
850
851s32 N(DownedChargedAnims)[] = {
852 STATUS_KEY_NORMAL, ANIM_Goomba_Hyper_Sleep,
853 STATUS_KEY_STONE, ANIM_Goomba_Hyper_Still,
854 STATUS_KEY_SLEEP, ANIM_Goomba_Hyper_Sleep,
855 STATUS_KEY_POISON, ANIM_Goomba_Hyper_Sleep,
856 STATUS_KEY_STOP, ANIM_Goomba_Hyper_Still,
857 STATUS_KEY_STATIC, ANIM_Goomba_Hyper_Sleep,
858 STATUS_KEY_PARALYZE, ANIM_Goomba_Hyper_Still,
859 STATUS_KEY_DIZZY, ANIM_Goomba_Hyper_Dizzy,
860 STATUS_KEY_FEAR, ANIM_Goomba_Hyper_Dizzy,
862};
863
864EvtScript N(EVS_Downed_Init) = {
865 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle)))
866 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent)))
867 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn)))
868 Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase)))
869 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
870 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE)
871 Return
872 End
873};
874
875EvtScript N(EVS_KnockDown_Init) = {
876 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle)))
877 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent)))
878 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn)))
879 Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase)))
880 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
882 CaseEq(0)
883 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE)
884 CaseEq(1)
885 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE)
886 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE)
887 Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
889 Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0)
890 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0)
891 Return
892 End
893};
894
895// everything below is copied from Hyper Goomba actor
896
897EvtScript N(EVS_HandlePhase) = {
898 Call(GetBattlePhase, LVar0)
904 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, 1)
906 Return
907 End
908};
909
910EvtScript N(EVS_Downed_Move_Charge) = {
911 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
912 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
913 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
914 Call(SetGoalToTarget, ACTOR_SELF)
915 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
916 IfEq(LVar0, 0)
917 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
918 Call(BattleCamTargetActor, ACTOR_SELF)
919 Call(MoveBattleCamOver, 20)
920 Wait(20)
921 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP)
922 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
923 Add(LVar1, 10)
924 PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0)
925 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
926 Wait(30)
927 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
928 Call(MoveBattleCamOver, 20)
929 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
930 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
931 Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2)
932 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
933 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_STEP)
934 Call(N(StartRumbleWithParams), 128, 10)
935 Thread
936 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5))
938 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 1)
939 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedChargedAnims)))
940 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
941 Call(EnableActorGlow, ACTOR_SELF, TRUE)
942 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE)
943 Wait(2)
944 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
945 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
946 Return
947 EndIf
948 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
949 Call(BattleCamTargetActor, ACTOR_SELF)
950 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
951 Loop(20)
952 Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
953 Wait(1)
954 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
955 Wait(1)
956 EndLoop
957 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
958 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
962 Set(LVarA, LVar0)
963 Thread
964 Loop(0)
965 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
966 Add(LVar0, 30)
967 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
970 EndIf
971 Wait(1)
972 EndLoop
973 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
975 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
976 EndIf
977 Wait(15)
978 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
980 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
981 Call(SetActorRotation, ACTOR_SELF, 0, 0, 80)
983 Call(SetGoalToTarget, ACTOR_SELF)
984 Call(AddGoalPos, ACTOR_SELF, -200, 0, 0)
985 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
986 Call(SetActorSpeed, ACTOR_SELF, Float(15.0))
987 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
988 Call(ResetAllActorSounds, ACTOR_SELF)
989 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
990 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
991 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
992 Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2)
993 Wait(20)
994 Call(EnableActorGlow, ACTOR_SELF, FALSE)
995 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
996 Call(YieldTurn)
997 Call(SetActorPos, ACTOR_SELF, 300, 0, 0)
998 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
999 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
1000 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1001 Call(SetGoalToHome, ACTOR_SELF)
1002 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1003 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1004 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
1005 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0)
1006 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1007 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1008 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1009 Return
1011 EndSwitch
1012 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0)
1013 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
1014 Call(SetActorRotation, ACTOR_SELF, 0, 0, 80)
1015 Call(SetGoalToTarget, ACTOR_SELF)
1016 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01))
1017 Call(SetActorSpeed, ACTOR_SELF, Float(15.0))
1018 Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE)
1019 Wait(2)
1020 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_BONK, BS_FLAGS1_TRIGGER_EVENTS)
1021 Switch(LVar0)
1024 Thread
1025 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
1026 Set(LVar0, 80)
1027 Loop(60)
1028 Add(LVar0, 18)
1029 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1030 Wait(1)
1031 EndLoop
1032 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1033 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1034 EndThread
1035 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1036 Call(ResetAllActorSounds, ACTOR_SELF)
1037 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
1038 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1039 Set(LVar1, 0)
1040 Sub(LVar0, 50)
1041 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1042 Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE)
1043 Sub(LVar0, 40)
1044 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1045 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
1046 Sub(LVar0, 30)
1047 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1048 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1049 Wait(10)
1050 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1051 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
1052 Call(YieldTurn)
1053 Call(SetActorYaw, ACTOR_SELF, 180)
1054 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
1055 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1056 Call(SetGoalToHome, ACTOR_SELF)
1057 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1058 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1059 Call(SetActorYaw, ACTOR_SELF, 0)
1060 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0)
1061 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1063 EndSwitch
1064 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1065 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1066 Return
1067 End
1068};
1069
1070EvtScript N(EVS_Downed_TakeTurn) = {
1071 Call(GetBattlePhase, LVar0)
1074 ExecWait(N(EVS_Attack_Headbonk))
1075 Return
1076 EndIf
1077 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
1078 IfEq(LVar0, 1)
1079 ExecWait(N(EVS_Downed_Move_Charge))
1080 Return
1081 EndIf
1082 Call(GetBattleVar, BTL_VAR_HyperSync, LVar0)
1083 Switch(LVar0)
1084 CaseEq(0)
1085 Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0)
1086 IfEq(LVar0, 0)
1087 Call(RandInt, 1000, LVar0)
1088 IfLt(LVar0, 750)
1090 ExecWait(N(EVS_Downed_Move_Charge))
1091 Else
1093 ExecWait(N(EVS_Attack_Headbonk))
1094 EndIf
1095 Else
1096 Call(RandInt, 1000, LVar0)
1097 IfLt(LVar0, 500)
1099 ExecWait(N(EVS_Downed_Move_Charge))
1100 Else
1102 ExecWait(N(EVS_Attack_Headbonk))
1103 EndIf
1104 EndIf
1105 CaseEq(1)
1106 ExecWait(N(EVS_Attack_Headbonk))
1107 CaseEq(2)
1108 ExecWait(N(EVS_Downed_Move_Charge))
1109 EndSwitch
1110 Return
1111 End
1112};
1113
1114s32 N(DownedAnims)[] = {
1115 STATUS_KEY_NORMAL, ANIM_Goomba_Hyper_Idle,
1116 STATUS_KEY_STONE, ANIM_Goomba_Hyper_Still,
1117 STATUS_KEY_SLEEP, ANIM_Goomba_Hyper_Sleep,
1118 STATUS_KEY_POISON, ANIM_Goomba_Hyper_Idle,
1119 STATUS_KEY_STOP, ANIM_Goomba_Hyper_Still,
1120 STATUS_KEY_STATIC, ANIM_Goomba_Hyper_Idle,
1121 STATUS_KEY_PARALYZE, ANIM_Goomba_Hyper_Still,
1122 STATUS_KEY_DIZZY, ANIM_Goomba_Hyper_Dizzy,
1123 STATUS_KEY_FEAR, ANIM_Goomba_Hyper_Dizzy,
1124 STATUS_END,
1125};
1126
1127s32 N(DownedShuffleAnims)[] = {
1128 STATUS_KEY_NORMAL, ANIM_Goomba_Hyper_Run,
1129 STATUS_KEY_STONE, ANIM_Goomba_Hyper_Still,
1130 STATUS_KEY_SLEEP, ANIM_Goomba_Hyper_Sleep,
1131 STATUS_KEY_POISON, ANIM_Goomba_Hyper_Idle,
1132 STATUS_KEY_STOP, ANIM_Goomba_Hyper_Still,
1133 STATUS_KEY_STATIC, ANIM_Goomba_Hyper_Run,
1134 STATUS_KEY_PARALYZE, ANIM_Goomba_Hyper_Still,
1135 STATUS_KEY_DIZZY, ANIM_Goomba_Hyper_Dizzy,
1136 STATUS_KEY_FEAR, ANIM_Goomba_Hyper_Dizzy,
1137 STATUS_END,
1138};
1139
1140EvtScript N(EVS_Downed_Init_Unused) = {
1141 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Attack_Headbonk)))
1142 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle)))
1143 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent)))
1144 Return
1145 End
1146};
1147
1148EvtScript N(EVS_Downed_Idle) = {
1149 Label(10)
1150 Call(RandInt, 80, LVar0)
1151 Add(LVar0, 80)
1152 Loop(LVar0)
1153 Label(0)
1154 Call(GetStatusFlags, ACTOR_SELF, LVar1)
1156 Wait(1)
1157 Goto(0)
1158 EndIf
1159 Wait(1)
1160 EndLoop
1161 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1162 Add(LVar0, 5)
1163 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
1164 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims)))
1165 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
1166 Call(IdleRunToGoal, ACTOR_SELF, 0)
1167 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1168 Loop(20)
1169 Label(1)
1170 Call(GetStatusFlags, ACTOR_SELF, LVar1)
1172 Wait(1)
1173 Goto(1)
1174 EndIf
1175 Wait(1)
1176 EndLoop
1177 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1178 Sub(LVar0, 5)
1179 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
1180 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims)))
1181 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
1182 Call(IdleRunToGoal, ACTOR_SELF, 0)
1183 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1184 Loop(80)
1185 Label(2)
1186 Call(GetStatusFlags, ACTOR_SELF, LVar1)
1188 Wait(1)
1189 Goto(2)
1190 EndIf
1191 Wait(1)
1192 EndLoop
1193 Goto(10)
1194 Return
1195 End
1196};
1197
1198EvtScript N(EVS_Downed_HandleEvent) = {
1199 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1200 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
1201 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1202 Call(GetLastEvent, ACTOR_SELF, LVar0)
1203 Switch(LVar0)
1206 SetConst(LVar0, PRT_MAIN)
1207 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1211 SetConst(LVar0, PRT_MAIN)
1212 SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt)
1213 SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill)
1216 SetConst(LVar0, PRT_MAIN)
1217 SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt)
1218 SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill)
1220 SetConst(LVar0, PRT_MAIN)
1221 SetConst(LVar1, ANIM_Goomba_Hyper_BurnStill)
1223 Return
1225 SetConst(LVar0, PRT_MAIN)
1226 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1229 SetConst(LVar0, PRT_MAIN)
1230 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1232 SetConst(LVar0, PRT_MAIN)
1233 SetConst(LVar1, ANIM_Goomba_Hyper_Dead)
1235 Return
1237 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1238 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1239 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1240 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
1241 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0)
1242 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1243 SetConst(LVar0, PRT_MAIN)
1244 SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute)
1246 SetConst(LVar0, PRT_MAIN)
1247 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1249 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1250 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1251 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy)
1252 Call(SetGoalToHome, ACTOR_SELF)
1253 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1254 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1255 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1256 Wait(5)
1257 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1258 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
1259 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1261 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1262 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1263 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1264 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
1265 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0)
1266 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1267 SetConst(LVar0, PRT_MAIN)
1268 SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute)
1270 SetConst(LVar0, PRT_MAIN)
1271 SetConst(LVar1, ANIM_Goomba_Hyper_Dead)
1273 Return
1275 Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0)
1276 IfEq(LVar0, 1)
1277 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
1278 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1279 Call(EnableActorGlow, ACTOR_SELF, FALSE)
1280 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
1281 Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0)
1282 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims)))
1283 EndIf
1284 SetConst(LVar0, PRT_MAIN)
1285 SetConst(LVar1, ANIM_Goomba_Hyper_Idle)
1290 SetConst(LVar0, PRT_MAIN)
1291 SetConst(LVar1, ANIM_Goomba_Hyper_Idle)
1295 SetConst(LVar0, PRT_MAIN)
1296 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1298 Wait(10)
1299 SetConst(LVar0, PRT_MAIN)
1300 SetConst(LVar1, ANIM_Goomba_Hyper_Dead)
1302 Return
1304 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1305 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
1306 Call(SetGoalToHome, ACTOR_SELF)
1307 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
1308 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1309 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1310 Call(HPBarToHome, ACTOR_SELF)
1312 SetConst(LVar0, PRT_MAIN)
1313 SetConst(LVar1, ANIM_Goomba_Hyper_Idle)
1316 SetConst(LVar0, PRT_MAIN)
1317 SetConst(LVar1, ANIM_Goomba_Hyper_Run)
1318 SetConst(LVar2, ANIM_Goomba_Hyper_Hurt)
1320 Return
1322 SetConst(LVar0, PRT_MAIN)
1323 SetConst(LVar1, ANIM_Goomba_Hyper_Run)
1326 SetConst(LVar0, PRT_MAIN)
1327 SetConst(LVar1, ANIM_Goomba_Hyper_Hurt)
1329 Return
1331 EndSwitch
1332 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1333 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1334 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1335 Return
1336 End
1337};
1338
1339#include "common/CalculateArcsinDeg.inc.c"
1340
1341EvtScript N(EVS_Attack_Headbonk) = {
1342 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1343 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
1344 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
1345 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
1346 Call(BattleCamTargetActor, ACTOR_SELF)
1347 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
1348 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
1349 Call(SetGoalToTarget, ACTOR_SELF)
1350 Call(AddGoalPos, ACTOR_SELF, 50, 0, 0)
1351 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
1352 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1353 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1354 Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0)
1355 Wait(1)
1356 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
1357 Wait(5)
1358 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1359 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair)
1360 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
1361 Switch(LVar0)
1364 Set(LVarA, LVar0)
1365 Call(SetGoalToTarget, ACTOR_SELF)
1366 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1367 Sub(LVar0, 10)
1368 Set(LVar1, 10)
1369 Add(LVar2, 3)
1370 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1371 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
1372 Thread
1373 Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
1374 Set(LVar0, 0)
1375 Loop(16)
1376 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1377 Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0)
1378 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1379 Set(LVar1, LVar4)
1380 Set(LVar2, LVar5)
1381 Set(LVar3, LVar6)
1382 Wait(1)
1383 EndLoop
1384 EndThread
1385 Thread
1386 Wait(6)
1387 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair)
1388 EndThread
1389 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
1390 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Sleep)
1391 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1392 Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0)
1393 Wait(1)
1394 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
1395 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
1396 Wait(1)
1397 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1398 Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0)
1399 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt)
1400 Wait(5)
1402 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
1403 EndIf
1404 Wait(5)
1405 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1406 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair)
1407 Call(SetGoalToTarget, ACTOR_SELF)
1408 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1409 Add(LVar0, 20)
1410 Set(LVar1, 0)
1411 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1412 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
1413 Thread
1414 Wait(4)
1415 Set(LVar0, 180)
1416 Loop(4)
1417 Sub(LVar0, 45)
1418 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1419 Wait(1)
1420 EndLoop
1421 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair)
1422 EndThread
1423 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
1424 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy)
1425 Wait(5)
1426 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1427 Call(YieldTurn)
1428 Call(SetActorYaw, ACTOR_SELF, 180)
1429 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
1430 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1431 Call(SetGoalToHome, ACTOR_SELF)
1432 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1433 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1434 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1435 Call(SetActorYaw, ACTOR_SELF, 0)
1436 Wait(5)
1437 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1438 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
1439 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
1440 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
1441 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1442 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1443 Return
1446 Call(SetGoalToTarget, ACTOR_SELF)
1447 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2))
1448 Thread
1449 Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0)
1450 Set(LVar0, 0)
1451 Loop(16)
1452 Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6)
1453 Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0)
1454 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1455 Set(LVar1, LVar4)
1456 Set(LVar2, LVar5)
1457 Set(LVar3, LVar6)
1458 Wait(1)
1459 EndLoop
1460 EndThread
1461 Thread
1462 Wait(6)
1463 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair)
1464 EndThread
1465 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
1466 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Tense)
1467 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1468 Wait(1)
1469 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0))
1470 Wait(1)
1471 EndSwitch
1472 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS)
1473 Switch(LVar0)
1476 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1477 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0))
1478 Wait(1)
1479 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
1480 Wait(1)
1481 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1482 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
1483 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1484 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1485 Add(LVar0, 40)
1486 Set(LVar1, 0)
1487 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
1488 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1489 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
1490 Add(LVar0, 30)
1491 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1492 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
1493 Add(LVar0, 20)
1494 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1495 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
1496 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle)
1497 Wait(3)
1498 Call(YieldTurn)
1499 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0))
1500 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run)
1501 Call(SetGoalToHome, ACTOR_SELF)
1502 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
1503 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
1504 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
1506 EndSwitch
1507 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1508 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1509 Return
1510 End
1511};
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_FLAG_ATTACK_CHARGED
Actor has charged an attack that can be removed with Star Beam.
Definition enums.h:3389
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ PHASE_ENEMY_BEGIN
Definition enums.h:2068
@ PHASE_PLAYER_BEGIN
Definition enums.h:2066
@ PHASE_ENEMY_END
Definition enums.h:2067
@ 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_INTERRUPT
Definition enums.h:4823
@ BTL_CAM_ACTOR
Definition enums.h:4836
@ 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_POWER_UP
Definition enums.h:1050
@ SOUND_PARAGOOMBA_FLY
Definition enums.h:1509
@ SOUND_ACTOR_HURT
Definition enums.h:748
@ SOUND_NONE
Definition enums.h:547
@ SOUND_PARAGOOMBA_PREDIVE
Definition enums.h:1510
@ SOUND_GOOMBA_STEP
Definition enums.h:1507
@ 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 IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:275
#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 BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251
#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
@ BTL_VAL_HyperSync_Active
Definition battle.h:86
@ BTL_VAL_HyperSync_Done
Definition battle.h:85
@ BTL_VAL_HyperSync_None
Definition battle.h:84
@ BTL_VAR_HyperSync
Definition battle.h:83