Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
koopatrol.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/Koopatrol.h"
4#include "effects.h"
5
6#define NAMESPACE A(koopatrol)
7
8extern EvtScript N(EVS_Init);
9extern EvtScript N(EVS_Idle);
10extern EvtScript N(EVS_TakeTurn);
11extern EvtScript N(EVS_HandleEvent);
12extern EvtScript N(EVS_HandlePhase);
13
14enum N(ActorPartIDs) {
15 PRT_MAIN = 1,
16};
17
18enum N(ActorVars) {
19 AVAR_State = 0,
20 AVAL_State_Normal = 0,
21 AVAL_State_Toppled = 1,
22 AVAL_State_Charged = 2,
23 AVAR_Generation = 1,
24 AVAR_AncestorColumn = 2,
25 AVAR_FlippedTurns = 9,
26};
27
28enum N(ActorParams) {
29 DMG_SHELL_TOSS = 4,
30 DMG_CHARGED_TOSS = 10,
31};
32
33s32 N(DefaultAnims)[] = {
34 STATUS_KEY_NORMAL, ANIM_Koopatrol_Anim01,
35 STATUS_KEY_STONE, ANIM_Koopatrol_Anim00,
36 STATUS_KEY_SLEEP, ANIM_Koopatrol_Anim11,
37 STATUS_KEY_POISON, ANIM_Koopatrol_Anim01,
38 STATUS_KEY_STOP, ANIM_Koopatrol_Anim00,
39 STATUS_KEY_STATIC, ANIM_Koopatrol_Anim01,
40 STATUS_KEY_PARALYZE, ANIM_Koopatrol_Anim00,
41 STATUS_KEY_DIZZY, ANIM_Koopatrol_Anim13,
42 STATUS_KEY_FEAR, ANIM_Koopatrol_Anim13,
44};
45
46s32 N(ShuffleAnims)[] = {
47 STATUS_KEY_NORMAL, ANIM_Koopatrol_Anim03,
48 STATUS_KEY_STONE, ANIM_Koopatrol_Anim00,
49 STATUS_KEY_SLEEP, ANIM_Koopatrol_Anim11,
50 STATUS_KEY_POISON, ANIM_Koopatrol_Anim03,
51 STATUS_KEY_STOP, ANIM_Koopatrol_Anim00,
52 STATUS_KEY_STATIC, ANIM_Koopatrol_Anim03,
53 STATUS_KEY_PARALYZE, ANIM_Koopatrol_Anim00,
54 STATUS_KEY_DIZZY, ANIM_Koopatrol_Anim13,
55 STATUS_KEY_FEAR, ANIM_Koopatrol_Anim13,
57};
58
59s32 N(ToppledAnims)[] = {
60 STATUS_KEY_NORMAL, ANIM_Koopatrol_Anim0F,
61 STATUS_KEY_STONE, ANIM_Koopatrol_Anim10,
62 STATUS_KEY_SLEEP, ANIM_Koopatrol_Anim12,
63 STATUS_KEY_POISON, ANIM_Koopatrol_Anim0F,
64 STATUS_KEY_STOP, ANIM_Koopatrol_Anim10,
65 STATUS_KEY_STATIC, ANIM_Koopatrol_Anim0F,
66 STATUS_KEY_PARALYZE, ANIM_Koopatrol_Anim10,
67 STATUS_KEY_DIZZY, ANIM_Koopatrol_Anim14,
68 STATUS_KEY_FEAR, ANIM_Koopatrol_Anim14,
70};
71
72s32 N(ChargedAnims)[] = {
73 STATUS_KEY_NORMAL, ANIM_Koopatrol_Anim06,
74 STATUS_KEY_STONE, ANIM_Koopatrol_Anim06,
75 STATUS_KEY_SLEEP, ANIM_Koopatrol_Anim06,
76 STATUS_KEY_POISON, ANIM_Koopatrol_Anim06,
77 STATUS_KEY_STOP, ANIM_Koopatrol_Anim06,
78 STATUS_KEY_STATIC, ANIM_Koopatrol_Anim06,
79 STATUS_KEY_PARALYZE, ANIM_Koopatrol_Anim06,
80 STATUS_KEY_DIZZY, ANIM_Koopatrol_Anim06,
81 STATUS_KEY_FEAR, ANIM_Koopatrol_Anim06,
83};
84
85s32 N(DefenseTable)[] = {
89};
90
91s32 N(ToppledDefense)[] = {
94};
95
96s32 N(ChargedDefense)[] = {
98 ELEMENT_FIRE, 3,
100};
101
102s32 N(StatusTable)[] = {
113 STATUS_KEY_STOP, 80,
125};
126
127s32 N(ChargedStatusTable)[] = {
148};
149
150ActorPartBlueprint N(ActorParts)[] = {
151 {
153 .index = PRT_MAIN,
154 .posOffset = { 0, 0, 0 },
155 .targetOffset = { 0, 32 },
156 .opacity = 255,
157 .idleAnimations = N(DefaultAnims),
158 .defenseTable = N(DefenseTable),
160 .elementImmunityFlags = 0,
161 .projectileTargetOffset = { 0, -12 },
162 },
163};
164
165ActorBlueprint NAMESPACE = {
166 .flags = 0,
167 .type = ACTOR_TYPE_KOOPATROL,
168 .level = ACTOR_LEVEL_KOOPATROL,
169 .maxHP = 8,
170 .partCount = ARRAY_COUNT(N(ActorParts)),
171 .partsData = N(ActorParts),
172 .initScript = &N(EVS_Init),
173 .statusTable = N(StatusTable),
174 .escapeChance = 50,
175 .airLiftChance = 75,
176 .hurricaneChance = 65,
177 .spookChance = 60,
178 .upAndAwayChance = 95,
179 .spinSmashReq = 0,
180 .powerBounceChance = 85,
181 .coinReward = 2,
182 .size = { 32, 42 },
183 .healthBarOffset = { 0, 0 },
184 .statusIconOffset = { -15, 32 },
185 .statusTextOffset = { 5, 32 },
186};
187
190
191EvtScript N(EVS_Init) = {
192 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
193 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
194 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
195 Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase)))
196 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
197 Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0)
198 Call(GetIndexFromHome, ACTOR_SELF, LVar0)
199 Call(SetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0)
201 CaseEq(0)
202 Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_0, 0)
203 CaseEq(1)
204 Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_1, 0)
205 CaseEq(2)
206 Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_2, 0)
207 CaseEq(3)
208 Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_3, 0)
210 Return
211 End
212};
213
214EvtScript N(EVS_HandlePhase) = {
215 Call(GetBattlePhase, LVar0)
222 Return
223 End
224};
225
226EvtScript N(EVS_UpdateOffsets) = {
228 CaseEq(AVAL_State_Normal)
230 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15)
231 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0)
232 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
233 Else
234 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32)
235 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4)
236 Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32)
237 EndIf
238 CaseEq(AVAL_State_Toppled)
239 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15)
240 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0)
241 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
242 CaseEq(AVAL_State_Charged)
243 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 20)
244 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6)
245 Call(N(SetAbsoluteStatusOffsets), -15, 22, 5, 22)
247 Return
248 End
249};
250
251EvtScript N(EVS_Idle) = {
252 Label(0)
253 Call(RandInt, 80, LVarA)
254 Add(LVarA, 80)
255 Loop(LVarA)
256 Label(1)
257 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
258 Call(GetStatusFlags, ACTOR_SELF, LVar1)
259 ExecWait(N(EVS_UpdateOffsets))
260 IfEq(LVar0, AVAL_State_Toppled)
261 Wait(1)
262 Goto(1)
263 EndIf
265 Wait(1)
266 Goto(1)
267 EndIf
268 Wait(1)
269 EndLoop
270 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
271 Add(LVar0, 5)
272 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
273 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims)))
274 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
275 Call(IdleRunToGoal, ACTOR_SELF, 0)
276 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
278 CaseEq(AVAL_State_Normal)
279 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
280 CaseEq(AVAL_State_Toppled)
281 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims)))
283 Loop(20)
284 Label(2)
285 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
286 Call(GetStatusFlags, ACTOR_SELF, LVar1)
287 ExecWait(N(EVS_UpdateOffsets))
288 IfEq(LVar0, AVAL_State_Toppled)
289 Wait(1)
290 Goto(2)
291 EndIf
293 Wait(1)
294 Goto(2)
295 EndIf
296 Wait(1)
297 EndLoop
298 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
299 Sub(LVar0, 5)
300 Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0))
301 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims)))
302 Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2)
303 Call(IdleRunToGoal, ACTOR_SELF, 0)
304 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
306 CaseEq(AVAL_State_Normal)
307 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
308 CaseEq(AVAL_State_Toppled)
309 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims)))
311 Loop(80)
312 Label(3)
313 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
314 Call(GetStatusFlags, ACTOR_SELF, LVar1)
315 ExecWait(N(EVS_UpdateOffsets))
316 IfEq(LVar0, AVAL_State_Toppled)
317 Wait(1)
318 Goto(3)
319 EndIf
321 Wait(1)
322 Goto(3)
323 EndIf
324 Wait(1)
325 EndLoop
326 Goto(0)
327 Return
328 End
329};
330
331s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 };
332
333EvtScript N(EVS_HandleEvent) = {
334 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
335 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
336 Call(SetActorYaw, ACTOR_SELF, 0)
337 Call(GetLastEvent, ACTOR_SELF, LVar0)
341 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
343 CaseOrEq(AVAL_State_Normal)
344 CaseOrEq(AVAL_State_Toppled)
345 SetConst(LVar0, PRT_MAIN)
346 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
349 CaseEq(AVAL_State_Charged)
350 SetConst(LVar0, PRT_MAIN)
351 SetConst(LVar1, ANIM_Koopatrol_Anim06)
356 SetConst(LVar0, PRT_MAIN)
357 SetConst(LVar1, ANIM_Koopatrol_Anim0C)
358 SetConst(LVar2, ANIM_Koopatrol_Anim0D)
361 SetConst(LVar0, PRT_MAIN)
362 SetConst(LVar1, ANIM_Koopatrol_Anim0C)
363 SetConst(LVar2, ANIM_Koopatrol_Anim0D)
365 SetConst(LVar0, PRT_MAIN)
366 SetConst(LVar1, ANIM_Koopatrol_Anim0D)
368 Return
370 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
372 CaseOrEq(AVAL_State_Normal)
373 CaseOrEq(AVAL_State_Toppled)
374 SetConst(LVar0, PRT_MAIN)
375 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
378 CaseEq(AVAL_State_Charged)
379 SetConst(LVar0, PRT_MAIN)
380 SetConst(LVar1, ANIM_Koopatrol_Anim06)
384 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
386 CaseOrEq(AVAL_State_Normal)
387 CaseOrEq(AVAL_State_Toppled)
388 SetConst(LVar0, PRT_MAIN)
389 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
391 SetConst(LVar0, PRT_MAIN)
392 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
395 CaseEq(AVAL_State_Charged)
396 SetConst(LVar0, PRT_MAIN)
397 SetConst(LVar1, ANIM_Koopatrol_Anim06)
399 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
400 Wait(5)
401 SetConst(LVar0, PRT_MAIN)
402 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
406 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled)
407 Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1)
408 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense)))
409 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims)))
410 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15)
411 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0)
412 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE)
413 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE)
414 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0B)
415 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
416 Thread
417 Wait(4)
418 Call(SetActorRotation, ACTOR_SELF, 0, 0, 30)
419 Wait(1)
420 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
421 Wait(1)
422 Call(SetActorRotation, ACTOR_SELF, 0, 0, -30)
423 Wait(1)
424 Call(SetActorRotation, ACTOR_SELF, 0, 0, -60)
425 Wait(1)
426 Call(SetActorRotation, ACTOR_SELF, 0, 0, -75)
427 Wait(1)
429 UseBuf(N(FlipPosOffsets))
430 Loop(ARRAY_COUNT(N(FlipPosOffsets)))
432 Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0)
433 Wait(1)
434 EndLoop
435 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
436 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
437 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F)
439 SetConst(LVar0, PRT_MAIN)
440 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
442 SetConst(LVar0, PRT_MAIN)
443 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
445 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
446 SetConst(LVar0, PRT_MAIN)
447 SetConst(LVar1, ANIM_Koopatrol_Anim04)
449 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
450 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
452 SetConst(LVar0, PRT_MAIN)
453 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
455 SetConst(LVar0, PRT_MAIN)
456 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
458 Return
460 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
461 IfEq(LVar0, AVAL_State_Charged)
462 Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable)))
463 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable)))
464 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE)
465 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
466 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
467 Call(GetStatusFlags, ACTOR_SELF, LVarA)
469 Call(EnableActorGlow, ACTOR_SELF, FALSE)
470 EndIf
471 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
472 SetConst(LVar0, PRT_MAIN)
473 SetConst(LVar1, ANIM_Koopatrol_Anim08)
475 EndIf
478 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
480 CaseEq(AVAL_State_Normal)
481 SetConst(LVar0, PRT_MAIN)
482 SetConst(LVar1, ANIM_Koopatrol_Anim07)
484 Call(GetStatusFlags, ACTOR_SELF, LVar0)
486 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
487 Wait(10)
488 EndIf
489 CaseEq(AVAL_State_Toppled)
490 SetConst(LVar0, PRT_MAIN)
491 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
493 CaseEq(AVAL_State_Charged)
494 SetConst(LVar0, PRT_MAIN)
495 SetConst(LVar1, ANIM_Koopatrol_Anim06)
500 Wait(10)
501 Set(LFlag0, FALSE)
502 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
503 Call(GetStatusFlags, ACTOR_SELF, LVar3)
505 Add(LVar1, 16)
506 Set(LFlag0, TRUE)
507 EndIf
509 Add(LVar0, -14)
510 Add(LVar1, 20)
511 Set(LFlag0, TRUE)
512 EndIf
514 Add(LVar0, -14)
515 Add(LVar1, 20)
516 Set(LFlag0, TRUE)
517 EndIf
518 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVarA)
519 IfEq(LVarA, AVAL_State_Charged)
520 Add(LVar1, 23)
521 Set(LFlag0, TRUE)
522 EndIf
523 IfEq(LFlag0, FALSE)
524 Add(LVar1, 42)
525 EndIf
526 PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0)
527 Wait(20)
529 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
531 CaseOrEq(AVAL_State_Normal)
532 CaseOrEq(AVAL_State_Toppled)
533 SetConst(LVar0, PRT_MAIN)
534 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
536 Wait(10)
537 SetConst(LVar0, PRT_MAIN)
538 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
540 Return
542 CaseEq(AVAL_State_Charged)
543 SetConst(LVar0, PRT_MAIN)
544 SetConst(LVar1, ANIM_Koopatrol_Anim06)
546 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
547 Wait(5)
548 SetConst(LVar0, PRT_MAIN)
549 SetConst(LVar1, ANIM_Koopatrol_Anim0B)
551 Return
554 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
556 CaseEq(AVAL_State_Normal)
557 SetConst(LVar0, PRT_MAIN)
558 SetConst(LVar1, ANIM_Koopatrol_Anim01)
560 CaseEq(AVAL_State_Toppled)
561 SetConst(LVar0, PRT_MAIN)
562 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
564 CaseEq(AVAL_State_Charged)
565 SetConst(LVar0, PRT_MAIN)
566 SetConst(LVar1, ANIM_Koopatrol_Anim06)
570 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
572 CaseOrEq(AVAL_State_Normal)
573 CaseOrEq(AVAL_State_Charged)
574 SetConst(LVar0, PRT_MAIN)
575 SetConst(LVar1, ANIM_Koopatrol_Anim04)
576 SetConst(LVar2, ANIM_Koopatrol_Anim0B)
578 Return
580 CaseEq(AVAL_State_Toppled)
581 SetConst(LVar0, PRT_MAIN)
582 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
586 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
588 CaseEq(AVAL_State_Normal)
589 SetConst(LVar0, PRT_MAIN)
590 SetConst(LVar1, ANIM_Koopatrol_Anim16)
592 CaseEq(AVAL_State_Toppled)
593 SetConst(LVar0, PRT_MAIN)
594 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
596 CaseEq(AVAL_State_Charged)
597 SetConst(LVar0, PRT_MAIN)
598 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
602 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
604 CaseEq(AVAL_State_Normal)
605 SetConst(LVar0, PRT_MAIN)
606 SetConst(LVar1, ANIM_Koopatrol_Anim16)
607 CaseEq(AVAL_State_Toppled)
608 SetConst(LVar0, PRT_MAIN)
609 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
610 CaseEq(AVAL_State_Charged)
611 SetConst(LVar0, PRT_MAIN)
612 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
615 Return
617 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
619 CaseEq(AVAL_State_Normal)
620 SetConst(LVar0, PRT_MAIN)
621 SetConst(LVar1, ANIM_Koopatrol_Anim01)
622 CaseEq(AVAL_State_Toppled)
623 SetConst(LVar0, PRT_MAIN)
624 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
625 CaseEq(AVAL_State_Charged)
626 SetConst(LVar0, PRT_MAIN)
627 SetConst(LVar1, ANIM_Koopatrol_Anim0F)
631 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART)
632 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
633 Return
634 End
635};
636
637EvtScript N(EVS_Attack_ShellToss) = {
638 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
639 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
640 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
641 Call(GetBattlePhase, LVar0)
643 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06)
644 Else
645 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
646 IfEq(LVar0, AVAL_State_Toppled)
647 Call(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0)
648 Sub(LVar0, 1)
649 IfGt(LVar0, 0)
650 Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0)
651 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
652 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0))
653 Wait(15)
654 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
655 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
656 Else
657 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
658 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0))
659 Wait(10)
660 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
661 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
662 Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0)
663 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP)
664 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F)
665 Set(LVar0, 0)
666 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
667 Thread
668 Loop(5)
669 Add(LVar0, 15)
670 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
671 Wait(1)
672 EndLoop
674 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
675 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
676 Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0))
677 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
678 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A)
679 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
680 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
681 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
682 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01)
683 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
684 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
685 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable)))
686 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32)
687 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4)
688 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE)
689 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE)
690 EndIf
691 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
692 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
693 Return
694 EndIf
695 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
696 Call(BattleCamTargetActor, ACTOR_SELF)
697 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
698 Wait(10)
699 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07)
700 Wait(10)
701 Thread
702 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
703 Add(LVar1, 4)
704 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
705 Wait(3)
706 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
707 Wait(2)
708 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
710 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN)
711 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06)
712 Wait(10)
713 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
714 EndIf
715 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS)
717 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS)
721 Set(LVarA, LVar0)
722 Call(SetGoalToTarget, ACTOR_SELF)
723 Call(AddGoalPos, ACTOR_SELF, -40, 0, 0)
724 Call(SetActorSpeed, ACTOR_SELF, Float(16.0))
725 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
726 Call(GetBattlePhase, LVar0)
728 Call(UseBattleCamPreset, BTL_CAM_ACTOR_TARGET_MIDPOINT)
729 Call(SetBattleCamDist, 300)
730 Call(SetBattleCamOffsetY, 20)
731 Call(MoveBattleCamOver, 10)
732 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
733 EndIf
735 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
736 EndIf
737 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
738 Wait(8)
739 Call(ResetAllActorSounds, ACTOR_SELF)
740 Call(SetActorYaw, ACTOR_SELF, 180)
741 Wait(4)
742 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16)
743 Wait(1)
744 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16)
745 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
746 Add(LVar1, 20)
747 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
748 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0))
749 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
750 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16)
751 Wait(6)
752 Sub(LVar1, 20)
753 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
754 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
755 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
756 Call(YieldTurn)
757 Call(SetActorYaw, ACTOR_SELF, 180)
758 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
759 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16)
760 Call(SetGoalToHome, ACTOR_SELF)
761 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
762 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
763 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01)
764 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
765 Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 0)
766 Call(SetActorYaw, ACTOR_SELF, 0)
767 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
768 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
769 Return
772 Call(SetGoalToTarget, ACTOR_SELF)
773 Call(SetActorSpeed, ACTOR_SELF, Float(16.0))
774 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
775 Call(ResetAllActorSounds, ACTOR_SELF)
776 Wait(2)
777 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS)
781 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
782 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
783 Add(LVar0, 40)
784 Set(LVar1, 0)
785 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8))
786 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
787 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
788 Add(LVar0, 30)
789 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
790 Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE)
791 Add(LVar0, 20)
792 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
793 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
794 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
795 Wait(8)
796 Call(YieldTurn)
797 SetConst(LVar0, PRT_MAIN)
798 SetConst(LVar1, ANIM_Koopatrol_Anim04)
800 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01)
803 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
804 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
805 Return
806 End
807};
808
809EvtScript N(EVS_Attack_ChargedToss) = {
810 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
811 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
812 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
813 Call(SetGoalToTarget, ACTOR_SELF)
814 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
815 IfEq(LVar0, AVAL_State_Normal) // charge for attack
816 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
817 Call(BattleCamTargetActor, ACTOR_SELF)
818 Call(MoveBattleCamOver, 20)
819 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP)
820 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
821 Add(LVar1, 10)
822 PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0)
823 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim15)
824 Wait(30)
825 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
826 Call(MoveBattleCamOver, 20)
827 Thread
828 Wait(8)
829 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07)
831 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
832 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
833 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
834 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
835 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A)
836 Call(N(StartRumbleWithParams), 128, 10)
837 Thread
838 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5))
840 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06)
841 Call(SetStatusTable, ACTOR_SELF, Ref(N(ChargedStatusTable)))
842 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedDefense)))
843 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE)
844 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged)
845 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedAnims)))
846 Call(EnableActorGlow, ACTOR_SELF, TRUE)
847 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE)
848 Wait(10)
849 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
850 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
851 Return
852 EndIf
853 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
854 Call(BattleCamTargetActor, ACTOR_SELF)
855 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
856 Loop(20)
857 Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
858 Wait(1)
859 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
860 Wait(1)
861 EndLoop
862 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
863 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL)
865 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS)
869 Set(LVarA, LVar0)
870 Thread
871 Loop(0)
872 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
873 Add(LVar0, 30)
874 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
877 EndIf
878 Wait(1)
879 EndLoop
880 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
882 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
883 EndIf
884 Wait(15)
885 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
887 Thread
888 Loop(30)
889 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
890 PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0)
891 Wait(1)
892 EndLoop
894 Call(SetGoalToTarget, ACTOR_SELF)
895 Call(AddGoalPos, ACTOR_SELF, -200, 0, 0)
896 Call(SetActorSpeed, ACTOR_SELF, Float(16.0))
897 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
898 Wait(15)
899 Call(GetStatusFlags, ACTOR_SELF, LVarA)
901 Call(EnableActorGlow, ACTOR_SELF, FALSE)
902 EndIf
903 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
904 Call(YieldTurn)
905 Call(ResetAllActorSounds, ACTOR_SELF)
906 Call(SetActorPos, ACTOR_SELF, 300, 0, 0)
907 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
908 Call(SetActorSpeed, ACTOR_SELF, Float(16.0))
909 Call(SetGoalToHome, ACTOR_SELF)
910 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
911 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08)
912 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
913 Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable)))
914 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable)))
915 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE)
916 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
917 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
918 Wait(10)
919 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
920 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
921 Return
924 Thread
925 Loop(30)
926 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
927 PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0)
928 Wait(1)
929 EndLoop
931 Call(SetGoalToTarget, ACTOR_SELF)
932 Call(SetActorSpeed, ACTOR_SELF, Float(16.0))
933 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
934 Wait(2)
935 Call(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, SUPPRESS_EVENT_ALL, 0, DMG_CHARGED_TOSS, BS_FLAGS1_TRIGGER_EVENTS)
939 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
940 Thread
941 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
942 Set(LVar0, 0)
943 Loop(60)
944 Add(LVar0, 18)
945 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
946 Wait(1)
947 EndLoop
948 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
949 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
951 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
952 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
953 Sub(LVar0, 50)
954 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
955 Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE)
956 Sub(LVar0, 40)
957 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
958 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
959 Sub(LVar0, 30)
960 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
961 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
962 Wait(20)
963 Call(YieldTurn)
964 Call(GetStatusFlags, ACTOR_SELF, LVarA)
966 Call(EnableActorGlow, ACTOR_SELF, FALSE)
967 EndIf
968 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
969 Call(ResetAllActorSounds, ACTOR_SELF)
970 Call(SetActorPos, ACTOR_SELF, 300, 0, 0)
971 SetConst(LVar0, PRT_MAIN)
972 SetConst(LVar1, ANIM_Koopatrol_Anim04)
974 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01)
975 Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable)))
976 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable)))
977 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE)
978 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
979 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims)))
982 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
983 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
984 Return
985 End
986};
987
988EvtScript N(EVS_GetAvailableColumn) = {
989 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
990 Call(InitTargetIterator)
991 Label(1)
992 Call(GetOwnerTarget, LVar0, LVar1)
993 Call(GetOriginalActorType, LVar0, LVar2)
995 CaseOrEq(ACTOR_TYPE_BILL_BLASTER)
996 CaseOrEq(ACTOR_TYPE_BOMBSHELL_BLASTER)
997 Set(LVarA, -1)
998 Return
1000 EndSwitch
1001 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1003 Goto(1)
1004 EndIf
1005 Set(LFlag1, FALSE)
1006 Set(LFlag2, FALSE)
1007 Set(LFlag3, FALSE)
1008 Set(LFlag4, FALSE)
1009 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1010 Call(InitTargetIterator)
1011 Label(0)
1012 Call(GetOwnerTarget, LVar0, LVar1)
1013 Call(GetIndexFromHome, LVar0, LVar1)
1014 Mod(LVar1, 4)
1015 Switch(LVar1)
1016 CaseEq(0)
1017 Set(LFlag1, TRUE)
1018 CaseEq(1)
1019 Set(LFlag2, TRUE)
1020 CaseEq(2)
1021 Set(LFlag3, TRUE)
1022 CaseEq(3)
1023 Set(LFlag4, TRUE)
1024 EndSwitch
1025 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1027 Goto(0)
1028 EndIf
1029 IfEq(LFlag1, FALSE)
1030 Set(LVarA, 0)
1031 Return
1032 EndIf
1033 IfEq(LFlag2, FALSE)
1034 Set(LVarA, 1)
1035 Return
1036 EndIf
1037 IfEq(LFlag3, FALSE)
1038 Set(LVarA, 2)
1039 Return
1040 EndIf
1041 IfEq(LFlag4, FALSE)
1042 Set(LVarA, 3)
1043 Return
1044 EndIf
1045 Set(LVarA, -1)
1046 Return
1047 End
1048};
1049
1050Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION };
1051
1052Formation N(BackupFormation) = {
1053 ACTOR_BY_POS(NAMESPACE, N(SummonPos), 100)
1054};
1055
1056EvtScript N(EVS_Move_SummonBackup) = {
1057 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
1058 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
1059 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
1060 Call(BattleCamTargetActor, ACTOR_SELF)
1061 Call(MoveBattleCamOver, 20)
1062 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP)
1063 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02)
1064 Wait(20)
1065 Loop(2)
1066 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02)
1067 Wait(8)
1068 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP)
1069 Call(SetActorYaw, ACTOR_SELF, 180)
1070 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09)
1071 Wait(8)
1072 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02)
1073 Wait(8)
1074 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP)
1075 Call(SetActorYaw, ACTOR_SELF, 0)
1076 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09)
1077 Wait(8)
1078 EndLoop
1079 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1080 Call(MoveBattleCamOver, 15)
1081 Thread
1082 Wait(8)
1083 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1084 PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0)
1085 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART)
1086 EndThread
1087 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16)
1088 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
1089 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1090 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
1091 Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE)
1092 Call(SummonEnemy, Ref(N(BackupFormation)), FALSE)
1093 Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3)
1094 Add(LVar1, 200)
1095 Call(SetActorPos, LVar0, LVar1, LVar2, LVar3)
1096 Call(SetGoalToIndex, LVar0, LVarA)
1097 Call(PlaySoundAtActor, LVar0, SOUND_SHELL_TOSS)
1098 Call(SetActorSounds, LVar0, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE)
1099 Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim06)
1100 Call(SetActorSpeed, LVar0, Float(6.0))
1101 Call(RunToGoal, LVar0, 0, FALSE)
1102 Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim08)
1103 Wait(10)
1104 Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim01)
1105 Call(GetActorPos, LVar0, LVar1, LVar2, LVar3)
1106 Call(ForceHomePos, LVar0, LVar1, LVar2, LVar3)
1107 Call(HPBarToHome, LVar0)
1108 Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1)
1109 Switch(LVar1)
1110 CaseEq(0)
1111 Call(SetActorVar, LVar0, AVAR_Generation, 1)
1112 CaseEq(1)
1113 Call(SetActorVar, LVar0, AVAR_Generation, 2)
1114 EndSwitch
1115 Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar1)
1116 Call(SetActorVar, LVar0, AVAR_AncestorColumn, LVar1)
1117 Switch(LVar1)
1118 CaseEq(0)
1120 Add(LVar0, 1)
1122 CaseEq(1)
1124 Add(LVar0, 1)
1126 CaseEq(2)
1128 Add(LVar0, 1)
1130 CaseEq(3)
1132 Add(LVar0, 1)
1134 EndSwitch
1135 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1136 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1137 Return
1138 End
1139};
1140
1141EvtScript N(EVS_CountActiveSummoners) = {
1142 Set(LVar9, 0)
1143 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
1144 Call(InitTargetIterator)
1145 Label(0)
1146 Call(GetOwnerTarget, LVar0, LVar1)
1147 Call(GetOriginalActorType, LVar0, LVar2)
1148 Switch(LVar2)
1149 CaseEq(ACTOR_TYPE_KOOPATROL)
1150 Call(GetStatusFlags, LVar0, LVar3)
1152 Call(GetActorVar, LVar0, AVAR_State, LVar3)
1153 IfEq(LVar3, AVAL_State_Normal)
1154 Call(GetActorVar, LVar0, AVAR_Generation, LVar3)
1155 Switch(LVar3)
1156 CaseOrEq(0)
1157 CaseOrEq(1)
1158 Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar3)
1159 Switch(LVar3)
1160 CaseEq(0)
1162 CaseEq(1)
1164 CaseEq(2)
1166 CaseEq(3)
1168 EndSwitch
1169 IfLt(LVar4, 2)
1170 Add(LVar9, 1)
1171 EndIf
1173 CaseEq(2)
1174 EndSwitch
1175 EndIf
1176 EndIf
1177 EndSwitch
1178 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1180 Goto(0)
1181 EndIf
1182 Return
1183 End
1184};
1185
1186EvtScript N(EVS_TakeTurn) = {
1187 Call(GetBattlePhase, LVar0)
1190 ExecWait(N(EVS_Attack_ShellToss))
1191 Return
1192 EndIf
1193 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
1194 Switch(LVar0)
1195 CaseEq(AVAL_State_Normal)
1196 Call(GetBattleVar, BTL_VAR_HyperSync, LVar0)
1197 Switch(LVar0)
1198 CaseEq(0)
1199 Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0)
1200 Switch(LVar0)
1201 CaseOrEq(0)
1202 CaseOrEq(1)
1203 Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0)
1204 Switch(LVar0)
1205 CaseEq(0)
1207 CaseEq(1)
1209 CaseEq(2)
1211 CaseEq(3)
1213 EndSwitch
1214 IfGe(LVar1, 2)
1215 Call(RandInt, 1000, LVar0)
1216 IfLt(LVar0, 300)
1218 ExecWait(N(EVS_Attack_ChargedToss))
1219 Else
1221 ExecWait(N(EVS_Attack_ShellToss))
1222 EndIf
1223 Return
1224 EndIf
1226 CaseEq(2)
1227 Call(RandInt, 1000, LVar0)
1228 IfLt(LVar0, 300)
1230 ExecWait(N(EVS_Attack_ChargedToss))
1231 Else
1233 ExecWait(N(EVS_Attack_ShellToss))
1234 EndIf
1235 Return
1236 EndSwitch
1237 ExecWait(N(EVS_GetAvailableColumn))
1238 IfEq(LVarA, -1)
1239 Call(RandInt, 1000, LVar0)
1240 IfLt(LVar0, 300)
1242 ExecWait(N(EVS_Attack_ChargedToss))
1243 Else
1245 ExecWait(N(EVS_Attack_ShellToss))
1246 EndIf
1247 Return
1248 EndIf
1249 ExecWait(N(EVS_CountActiveSummoners))
1250 Switch(LVar9)
1251 CaseEq(1)
1252 Call(RandInt, 1000, LVar0)
1253 IfLt(LVar0, 400)
1255 ExecWait(N(EVS_Move_SummonBackup))
1256 Return
1257 EndIf
1258 CaseEq(2)
1259 Call(RandInt, 1000, LVar0)
1260 IfLt(LVar0, 200)
1262 ExecWait(N(EVS_Move_SummonBackup))
1263 Return
1264 EndIf
1265 CaseEq(3)
1266 Call(RandInt, 1000, LVar0)
1267 IfLt(LVar0, 100)
1269 ExecWait(N(EVS_Move_SummonBackup))
1270 Return
1271 EndIf
1272 EndSwitch
1273 Call(RandInt, 1000, LVar0)
1274 IfLt(LVar0, 300)
1276 ExecWait(N(EVS_Attack_ChargedToss))
1277 Else
1279 ExecWait(N(EVS_Attack_ShellToss))
1280 EndIf
1281 CaseEq(1)
1282 Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0)
1283 Switch(LVar0)
1284 CaseOrEq(0)
1285 CaseOrEq(1)
1286 Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0)
1287 Switch(LVar0)
1288 CaseEq(0)
1290 CaseEq(1)
1292 CaseEq(2)
1294 CaseEq(3)
1296 EndSwitch
1297 IfGe(LVar1, 2)
1298 Call(RandInt, 1000, LVar0)
1299 IfLt(LVar0, 300)
1301 ExecWait(N(EVS_Attack_ChargedToss))
1302 Else
1304 ExecWait(N(EVS_Attack_ShellToss))
1305 EndIf
1306 Return
1307 EndIf
1309 CaseEq(2)
1310 ExecWait(N(EVS_Attack_ShellToss))
1311 Return
1312 EndSwitch
1313 ExecWait(N(EVS_GetAvailableColumn))
1314 IfEq(LVarA, -1)
1315 ExecWait(N(EVS_Attack_ShellToss))
1316 Return
1317 EndIf
1318 ExecWait(N(EVS_CountActiveSummoners))
1319 Switch(LVar9)
1320 CaseEq(1)
1321 Call(RandInt, 1000, LVar0)
1322 IfLt(LVar0, 400)
1323 ExecWait(N(EVS_Move_SummonBackup))
1324 Return
1325 EndIf
1326 CaseEq(2)
1327 Call(RandInt, 1000, LVar0)
1328 IfLt(LVar0, 200)
1329 ExecWait(N(EVS_Move_SummonBackup))
1330 Return
1331 EndIf
1332 CaseEq(3)
1333 Call(RandInt, 1000, LVar0)
1334 IfLt(LVar0, 100)
1335 ExecWait(N(EVS_Move_SummonBackup))
1336 Return
1337 EndIf
1338 EndSwitch
1339 ExecWait(N(EVS_Attack_ShellToss))
1340 CaseEq(2)
1341 ExecWait(N(EVS_Attack_ChargedToss))
1342 EndSwitch
1343 CaseEq(AVAL_State_Toppled)
1345 ExecWait(N(EVS_Attack_ShellToss))
1346 CaseEq(AVAL_State_Charged)
1347 ExecWait(N(EVS_Attack_ChargedToss))
1348 EndSwitch
1349 Return
1350 End
1351};
1352
Bytecode EvtScript[]
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_WALK
Definition enums.h:2034
@ 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_FIRE
Definition enums.h:2116
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_SHOCK
Definition enums.h:2125
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ ACTOR_EVENT_FLAG_ATTACK_CHARGED
Actor has charged an attack that can be removed with Star Beam.
Definition enums.h:3389
@ ACTOR_EVENT_FLAG_FLIPABLE
Actor can be flipped; triggered by jump and quake attacks.
Definition enums.h:3380
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ 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
@ 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_ACTOR_TARGET_MIDPOINT
Definition enums.h:4827
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_INTERRUPT
Definition enums.h:4823
@ BTL_CAM_ACTOR
Definition enums.h:4836
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4885
@ TARGET_FLAG_PRIMARY_ONLY
Definition enums.h:1863
@ TARGET_FLAG_2
Definition enums.h:1850
@ SUPPRESS_EVENT_ALL
Definition enums.h:2907
@ IDLE_SCRIPT_RESTART
Definition enums.h:6409
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_ATTACK_BOOST
Definition enums.h:2826
@ STATUS_FLAG_DEFENSE_BOOST
Definition enums.h:2827
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_GLOWING
Definition enums.h:2824
@ SOUND_POWER_UP
Definition enums.h:1050
@ SOUND_NONE
Definition enums.h:547
@ SOUND_RECOVER_HEART
Definition enums.h:1406
@ SOUND_ACTOR_STEP_A
Definition enums.h:1474
@ SOUND_SHELL_SPIN
Definition enums.h:1342
@ SOUND_KOOPA_LAUNCH_SHELL
Definition enums.h:1196
@ SOUND_SHELL_TOSS
Definition enums.h:1497
@ SOUND_ACTOR_JUMP
Definition enums.h:1290
@ SOUND_CALL_FOR_BACKUP
Definition enums.h:1063
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
Definition enums.h:3330
@ 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_STAR_BEAM
Definition enums.h:2140
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_SPIKE_TAUNT
Definition enums.h:2148
@ EVENT_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_FLIP_TRIGGER
Definition enums.h:2135
@ 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
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
EvtScript EVS_Enemy_ReturnHome
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 Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define IfGe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR >= RVAR.
Definition macros.h:284
#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 LFlag4
Definition macros.h:171
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define UseBuf(INT_PTR)
Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
Definition macros.h:389
#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 BufRead1(VAR)
Consumes the next s32 from the buffer and stores it in the given variable.
Definition macros.h:392
#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 LFlag1
Definition macros.h:168
#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 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 LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
Definition macros.h:292
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LFlag2
Definition macros.h:169
#define LVar9
Definition macros.h:157
#define NPC_DISPOSE_LOCATION
Definition macros.h:158
#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 LFlag3
Definition macros.h:170
#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
#define ACTOR_BY_POS(_name, _pos, _priority, args...)
Definition battle.h:230
@ BTL_VAR_KoopatrolSummonCount_2
Definition battle.h:94
@ BTL_VAL_HyperSync_Active
Definition battle.h:86
@ BTL_VAR_KoopatrolSummonCount_0
Definition battle.h:92
@ BTL_VAL_HyperSync_Done
Definition battle.h:85
@ BTL_VAR_KoopatrolSummonCount_1
Definition battle.h:93
@ BTL_VAL_HyperSync_None
Definition battle.h:84
@ BTL_VAR_HyperSync
Definition battle.h:83
@ BTL_VAR_KoopatrolSummonCount_3
Definition battle.h:95
FormationRow Formation[]
Definition battle.h:167