Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
yellow_magikoopa.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "effects.h"
4#include "sprite/npc/Magikoopa.h"
5#include "sprite/npc/FlyingMagikoopa.h"
6
7#define NAMESPACE A(yellow_magikoopa)
8
9extern s32 N(GroundAnims)[];
10extern s32 N(FlyingAnims)[];
11extern s32 N(BroomAnims)[];
12
13extern EvtScript N(EVS_Init);
14extern EvtScript N(EVS_TakeTurn);
15extern EvtScript N(EVS_Init_Flying);
16extern EvtScript N(EVS_Flee);
17
18enum N(ActorPartIDs) {
19 PRT_GROUND = 1,
20 PRT_FLYING = 2,
21 PRT_BROOM = 3,
22};
23
24enum N(ActorVars) {
25 AVAR_ShouldKnockDown = 0,
26};
27
28enum N(ActorParams) {
29 DMG_MAGIC_BLAST = 3,
30 DMG_WAND_STRIKE = 3,
31};
32
33s32 N(DefenseTable)[] = {
36};
37
38s32 N(FlyingDefense)[] = {
41};
42
43s32 N(StatusTable)[] = {
66};
67
68s32 N(FlyingStatusTable)[] = {
91};
92
93ActorPartBlueprint N(GroundParts)[] = {
94 {
96 .index = PRT_GROUND,
97 .posOffset = { 0, 0, 0 },
98 .targetOffset = { 2, 35 },
99 .opacity = 255,
100 .idleAnimations = N(GroundAnims),
101 .defenseTable = N(DefenseTable),
102 .eventFlags = 0,
103 .elementImmunityFlags = 0,
104 .projectileTargetOffset = { -5, -12 },
105 },
106};
107
108ActorPartBlueprint N(FlyingParts)[] = {
109 {
111 .index = PRT_GROUND,
112 .posOffset = { 0, 0, 0 },
113 .targetOffset = { 2, 35 },
114 .opacity = 255,
115 .idleAnimations = N(GroundAnims),
116 .defenseTable = N(FlyingDefense),
117 .eventFlags = 0,
118 .elementImmunityFlags = 0,
119 .projectileTargetOffset = { -5, -12 },
120 },
121 {
123 .index = PRT_FLYING,
124 .posOffset = { 0, 0, 0 },
125 .targetOffset = { -10, 35 },
126 .opacity = 255,
127 .idleAnimations = N(FlyingAnims),
128 .defenseTable = N(FlyingDefense),
130 .elementImmunityFlags = 0,
131 .projectileTargetOffset = { 0, -8 },
132 },
133 {
135 .index = PRT_BROOM,
136 .posOffset = { 0, 0, 0 },
137 .targetOffset = { 0, 0 },
138 .opacity = 255,
139 .idleAnimations = N(BroomAnims),
140 .defenseTable = N(FlyingDefense),
141 .eventFlags = 0,
142 .elementImmunityFlags = 0,
143 .projectileTargetOffset = { 0, 0 },
144 },
145};
146
147ActorBlueprint NAMESPACE = {
148 .flags = 0,
149 .type = ACTOR_TYPE_YELLOW_MAGIKOOPA,
150 .level = ACTOR_LEVEL_YELLOW_MAGIKOOPA,
151 .maxHP = 11,
152 .partCount = ARRAY_COUNT(N(GroundParts)),
153 .partsData = N(GroundParts),
154 .initScript = &N(EVS_Init),
155 .statusTable = N(StatusTable),
156 .escapeChance = 40,
157 .airLiftChance = 80,
158 .hurricaneChance = 70,
159 .spookChance = 40,
160 .upAndAwayChance = 95,
161 .spinSmashReq = 0,
162 .powerBounceChance = 80,
163 .coinReward = 2,
164 .size = { 36, 40 },
165 .healthBarOffset = { 0, 0 },
166 .statusIconOffset = { -10, 20 },
167 .statusTextOffset = { 10, 32 },
168};
169
170ActorBlueprint N(flying) = {
171 .flags = ACTOR_FLAG_FLYING,
172 .type = ACTOR_TYPE_FLYING_YELLOW_MAGIKOOPA,
173 .level = ACTOR_LEVEL_FLYING_YELLOW_MAGIKOOPA,
174 .maxHP = 11,
175 .partCount = ARRAY_COUNT(N(FlyingParts)),
176 .partsData = N(FlyingParts),
177 .initScript = &N(EVS_Init_Flying),
178 .statusTable = N(FlyingStatusTable),
179 .escapeChance = 40,
180 .airLiftChance = 95,
181 .hurricaneChance = 75,
182 .spookChance = 40,
183 .upAndAwayChance = 95,
184 .spinSmashReq = 0,
185 .powerBounceChance = 80,
186 .coinReward = 2,
187 .size = { 48, 40 },
188 .healthBarOffset = { 0, 0 },
189 .statusIconOffset = { -25, 20 },
190 .statusTextOffset = { 1, 34 },
191};
192
193s32 N(GroundAnims)[] = {
194 STATUS_KEY_NORMAL, ANIM_Magikoopa_Yellow_Anim01,
195 STATUS_KEY_STONE, ANIM_Magikoopa_Yellow_Anim00,
196 STATUS_KEY_SLEEP, ANIM_Magikoopa_Yellow_Anim08,
197 STATUS_KEY_POISON, ANIM_Magikoopa_Yellow_Anim01,
198 STATUS_KEY_STOP, ANIM_Magikoopa_Yellow_Anim00,
199 STATUS_KEY_STATIC, ANIM_Magikoopa_Yellow_Anim01,
200 STATUS_KEY_PARALYZE, ANIM_Magikoopa_Yellow_Anim00,
201 STATUS_KEY_DIZZY, ANIM_Magikoopa_Yellow_Anim07,
202 STATUS_KEY_FEAR, ANIM_Magikoopa_Yellow_Anim07,
204};
205
206s32 N(FlyingAnims)[] = {
207 STATUS_KEY_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim01,
208 STATUS_KEY_STONE, ANIM_FlyingMagikoopa_Yellow_Anim00,
209 STATUS_KEY_SLEEP, ANIM_FlyingMagikoopa_Yellow_Anim08,
210 STATUS_KEY_POISON, ANIM_FlyingMagikoopa_Yellow_Anim01,
211 STATUS_KEY_STOP, ANIM_FlyingMagikoopa_Yellow_Anim00,
212 STATUS_KEY_STATIC, ANIM_FlyingMagikoopa_Yellow_Anim01,
213 STATUS_KEY_PARALYZE, ANIM_FlyingMagikoopa_Yellow_Anim00,
214 STATUS_KEY_DIZZY, ANIM_FlyingMagikoopa_Yellow_Anim07,
215 STATUS_KEY_FEAR, ANIM_FlyingMagikoopa_Yellow_Anim07,
217};
218
219s32 N(BroomAnims)[] = {
220 STATUS_KEY_NORMAL, ANIM_FlyingMagikoopa_Yellow_Anim0A,
222};
223
224EvtScript N(EVS_Idle) = {
225 Return
226 End
227};
228
230
231EvtScript N(EVS_HandleEvent) = {
232 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
233 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
234 Call(GetLastEvent, ACTOR_SELF, LVar0)
238 SetConst(LVar0, PRT_GROUND)
239 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
243 SetConst(LVar0, PRT_GROUND)
244 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim05)
245 SetConst(LVar2, ANIM_Magikoopa_Yellow_Anim06)
248 SetConst(LVar0, PRT_GROUND)
249 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim05)
250 SetConst(LVar2, ANIM_Magikoopa_Yellow_Anim06)
252 SetConst(LVar0, PRT_GROUND)
253 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim06)
255 Return
257 SetConst(LVar0, PRT_GROUND)
258 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
261 SetConst(LVar0, PRT_GROUND)
262 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
264 SetConst(LVar0, PRT_GROUND)
265 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
267 Return
271 SetConst(LVar0, PRT_GROUND)
272 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim01)
276 SetConst(LVar0, PRT_GROUND)
277 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
279 Wait(10)
280 SetConst(LVar0, PRT_GROUND)
281 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
283 Return
285 SetConst(LVar0, PRT_GROUND)
286 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim01)
289 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04)
290 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5))
291 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
292 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
293 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
294 Wait(15)
295 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02)
296 ExecWait(N(EVS_Flee))
297 Return
299 SetConst(LVar0, PRT_GROUND)
300 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim02)
303 Call(GetStatusFlags, ACTOR_SELF, LVar0)
306 Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0)
307 Else
308 Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0)
309 EndIf
310 EndIf
311 SetConst(LVar0, PRT_GROUND)
312 SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04)
314 Return
317 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
318 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
319 Return
320 End
321};
322
323#include "common/GetSelectedMoveID.inc.c"
324
325EvtScript N(EVS_KnockDownCheck) = {
326 Call(GetBattleFlags, LVar0)
329 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
330 EndIf
331 Else
332 Call(N(GetSelectedMoveID), LVar0)
334 CaseOrEq(MOVE_HEADBONK1)
335 CaseOrEq(MOVE_HEADBONK2)
336 CaseOrEq(MOVE_HEADBONK3)
337 CaseOrEq(MOVE_MULTIBONK)
338 Call(GetBattleFlags, LVar0)
340 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
341 EndIf
344 EndIf
345 Return
346 End
347};
348
351
352EvtScript N(EVS_KnockDown) = {
353 Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0)
354 IfEq(LVar0, 1)
355 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04)
356 Goto(0)
357 EndIf
358 Call(GetLastElement, LVar0)
360 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04)
361 Goto(0)
362 EndIf
363 Return
364 Label(0)
365 Call(HideHealthBar, ACTOR_SELF)
366 Call(GetStatusFlags, ACTOR_SELF, LVar0)
368 Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4))
369 EndIf
370 Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
371 Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE)
372 Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE)
373 Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
374 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE)
375 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE)
376 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
377 Sub(LVar2, 1)
378 Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2)
379 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
380 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
381 Set(LVar1, 0)
382 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
383 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
384 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
385 Call(N(StartRumbleWithParams), 150, 10)
386 Thread
387 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7))
389 Call(GetLastEvent, ACTOR_SELF, LVar3)
391 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04)
392 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
393 Add(LVar4, 10)
394 Add(LVar5, 5)
395 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0)
396 EndIf
397 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
398 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
399 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
400 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
401 Loop(20)
402 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE)
403 Wait(1)
404 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE)
405 Wait(1)
406 EndLoop
407 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE)
408 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01)
409 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
410 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
411 Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_YELLOW_MAGIKOOPA)
412 Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable)))
413 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32)
414 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
415 Call(ResetAllActorSounds, ACTOR_SELF)
416 Call(GetIndexFromPos, ACTOR_SELF, LVar0)
417 Mod(LVar0, 4)
418 Call(SetGoalToIndex, ACTOR_SELF, LVar0)
419 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
420 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
421 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
422 Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
423 Call(HPBarToHome, ACTOR_SELF)
424 Return
425 End
426};
427
428EvtScript N(EVS_HandleEvent_Flying) = {
429 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
430 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
431 Call(GetLastEvent, ACTOR_SELF, LVar0)
434 ExecWait(N(EVS_KnockDownCheck))
435 SetConst(LVar0, PRT_FLYING)
436 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
440 ExecWait(N(EVS_KnockDownCheck))
441 SetConst(LVar0, PRT_FLYING)
442 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
444 ExecWait(N(EVS_KnockDown))
448 ExecWait(N(EVS_KnockDownCheck))
449 SetConst(LVar0, PRT_FLYING)
450 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
451 SetConst(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
453 ExecWait(N(EVS_KnockDown))
456 SetConst(LVar0, PRT_FLYING)
457 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05)
458 SetConst(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06)
460 SetConst(LVar0, PRT_FLYING)
461 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim06)
463 Return
465 SetConst(LVar0, PRT_FLYING)
466 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
469 SetConst(LVar0, PRT_FLYING)
470 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
472 SetConst(LVar0, PRT_FLYING)
473 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
475 Return
479 SetConst(LVar0, PRT_FLYING)
480 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
484 SetConst(LVar0, PRT_FLYING)
485 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
487 Wait(10)
488 SetConst(LVar0, PRT_FLYING)
489 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
491 Return
493 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
494 Call(HPBarToCurrent, ACTOR_SELF)
496 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01)
497 Call(SetGoalToHome, ACTOR_SELF)
498 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
499 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
500 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01)
501 Call(HPBarToHome, ACTOR_SELF)
503 SetConst(LVar0, PRT_FLYING)
504 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01)
507 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim04)
508 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5))
509 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
510 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
511 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
512 Wait(15)
513 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02)
514 ExecWait(N(EVS_Flee))
515 Return
517 SetConst(LVar0, PRT_FLYING)
518 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim02)
521 Call(GetStatusFlags, ACTOR_SELF, LVar0)
524 Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0)
525 Else
526 Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0)
527 EndIf
528 EndIf
529 SetConst(LVar0, PRT_FLYING)
530 SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04)
532 Return
535 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
536 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
537 Return
538 End
539};
540
541EvtScript N(EVS_Attack_MagicBlast) = {
542 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
543 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
544 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
545 Call(GetBattlePhase, LVar0)
547 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
548 Call(MoveBattleCamOver, 1)
549 Else
550 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
551 Call(MoveBattleCamOver, 10)
552 EndIf
553 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
554 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
555 Call(GetStatusFlags, ACTOR_SELF, LVarA)
557 Sub(LVar0, 12)
558 Add(LVar1, 14)
559 Else
560 Sub(LVar0, 30)
561 Add(LVar1, 36)
562 EndIf
563 PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0)
564 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02)
565 Wait(30)
566 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
570 Set(LVarA, LVar0)
571 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
572 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03)
573 Wait(5)
574 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
575 Call(GetStatusFlags, ACTOR_SELF, LVar9)
577 Sub(LVar0, 8)
578 Add(LVar1, 8)
579 Else
580 Sub(LVar0, 20)
581 Add(LVar1, 20)
582 EndIf
583 Call(SetGoalToTarget, ACTOR_SELF)
584 Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
585 Sub(LVar3, 50)
586 Set(LVar4, 0)
587 Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
588 Wait(50)
590 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
591 EndIf
592 Wait(14)
593 Call(YieldTurn)
594 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
595 Wait(30)
596 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
597 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
598 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
599 Return
602 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
603 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03)
604 Wait(5)
605 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
606 Call(GetStatusFlags, ACTOR_SELF, LVarA)
608 Sub(LVar0, 8)
609 Add(LVar1, 8)
610 Else
611 Sub(LVar0, 20)
612 Add(LVar1, 20)
613 EndIf
614 Call(SetGoalToTarget, ACTOR_SELF)
615 Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
616 Sub(LVar3, 10)
617 Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
618 Wait(18)
619 Wait(2)
620 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS)
624 Wait(19)
625 Call(YieldTurn)
628 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
629 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
630 Return
631 End
632};
633
634EvtScript N(EVS_Attack_WandStrike) = {
635 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
636 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
637 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
638 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
639 Call(BattleCamTargetActor, ACTOR_SELF)
640 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
641 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH)
642 Thread
643 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02)
644 Set(LVar0, 200)
645 Loop(20)
646 Sub(LVar0, 10)
647 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
648 Wait(1)
649 EndLoop
651 Wait(10)
652 Call(SetGoalToTarget, ACTOR_SELF)
653 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
654 Call(GetStatusFlags, ACTOR_SELF, LVarA)
656 Add(LVar0, 5)
657 Else
658 Add(LVar0, 25)
659 EndIf
660 Set(LVar1, 0)
661 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
662 Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT)
663 Set(LVar0, 55)
664 Loop(20)
665 Add(LVar0, 10)
666 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
667 Wait(1)
668 EndLoop
669 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
670 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim03)
671 Wait(11)
673 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
677 Set(LVarA, LVar0)
678 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
680 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
681 EndIf
682 Wait(15)
683 Set(LVar0, 200)
684 Loop(20)
685 Sub(LVar0, 10)
686 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
687 Wait(1)
688 EndLoop
689 Call(YieldTurn)
690 Call(SetGoalToHome, ACTOR_SELF)
691 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01)
692 Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT)
693 Set(LVar0, 55)
694 Loop(20)
695 Add(LVar0, 10)
696 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
697 Wait(1)
698 EndLoop
699 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
700 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
701 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
702 Return
705 Call(SetGoalToTarget, ACTOR_SELF)
706 Wait(2)
707 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS)
711 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
712 Wait(10)
713 Set(LVar0, 200)
714 Loop(20)
715 Sub(LVar0, 10)
716 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
717 Wait(1)
718 EndLoop
719 Call(YieldTurn)
720 Call(SetGoalToHome, ACTOR_SELF)
721 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01)
722 Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT)
723 Set(LVar0, 55)
724 Loop(20)
725 Add(LVar0, 10)
726 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
727 Wait(1)
728 EndLoop
729 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
732 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
733 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
734 Return
735 End
736};
737
738EvtScript N(EVS_Flee) = {
739 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
740 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
741 Call(HideHealthBar, ACTOR_SELF)
742 Call(GetLastEvent, ACTOR_SELF, LVar0)
744 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
745 Call(BattleCamTargetActor, ACTOR_SELF)
746 Call(MoveBattleCamOver, 15)
747 Wait(15)
748 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
749 EndIf
750 Call(SetActorSpeed, ACTOR_SELF, Float(1.0))
751 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
752 Add(LVar0, 20)
753 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
754 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
755 Wait(10)
756 Call(SetActorYaw, ACTOR_SELF, 180)
757 Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
758 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
759 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
760 Add(LVar0, 200)
761 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
762 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
763 Call(YieldTurn)
764 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
766 Call(HideHealthBar, ACTOR_SELF)
767 Call(RemoveActor, ACTOR_SELF)
768 Return
769 End
770};
771
772EvtScript N(EVS_Init) = {
773 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
774 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
775 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
777 IfEq(LVar0, 0)
779 EndIf
780 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE)
781 Return
782 End
783};
784
785EvtScript N(EVS_Init_Flying) = {
786 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
787 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
788 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying)))
790 IfEq(LVar0, 0)
792 EndIf
793 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE)
794 Return
795 End
796};
797
798#include "common/battle/CheckMagikoopaCastTarget.inc.c"
799
800EvtScript N(EVS_TakeTurn) = {
801 Set(LFlag0, FALSE)
802 Label(10)
803 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
804 Call(InitTargetIterator)
805 Label(0)
806 Call(GetOwnerTarget, LVar0, LVar1)
807 Call(GetIndexFromHome, LVar0, LVar1)
810 Call(N(CheckMagikoopaCastTarget), LVar0, LVar3)
811 IfEq(LVar3, 0)
812 Call(GetStatusFlags, LVar0, LVar4)
814 Set(LVar8, LVar0)
816 Goto(100)
817 EndIf
818 EndIf
819 EndIf
820 Call(ChooseNextTarget, ITER_NEXT, LVar0)
822 Goto(0)
823 EndIf
824 IfEq(LFlag0, FALSE)
825 Set(LFlag0, TRUE)
827 Goto(10)
828 EndIf
830 IfEq(LVar0, 1)
831 ExecWait(N(EVS_Flee))
832 Return
833 EndIf
834 Call(GetActorFlags, ACTOR_SELF, LVar0)
836 ExecWait(N(EVS_Attack_MagicBlast))
837 Else
838 ExecWait(N(EVS_Attack_WandStrike))
839 EndIf
840 Return
841 Label(100)
842 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
843 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
844 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
845 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
846 Call(BattleCamTargetActor, ACTOR_SELF)
847 Call(MoveBattleCamOver, 15)
848 Wait(15)
849 Call(GetActorFlags, ACTOR_SELF, LVar0)
851 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02)
852 Else
853 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02)
854 EndIf
855 Wait(5)
856 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY)
857 Call(GetActorFlags, ACTOR_SELF, LVar0)
859 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
860 Call(GetStatusFlags, ACTOR_SELF, LVarA)
862 Sub(LVar0, 6)
863 Add(LVar1, 12)
864 Sub(LVar2, 2)
865 PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0)
866 Else
867 Sub(LVar0, 16)
868 Add(LVar1, 31)
869 Sub(LVar2, 2)
870 PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0)
871 EndIf
872 Else
873 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
874 Call(GetStatusFlags, ACTOR_SELF, LVarA)
876 Sub(LVar0, 12)
877 Add(LVar1, 14)
878 Sub(LVar2, 2)
879 PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0)
880 Else
881 Sub(LVar0, 30)
882 Add(LVar1, 36)
883 Sub(LVar2, 2)
884 PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0)
885 EndIf
886 EndIf
887 Wait(30)
888 Call(GetActorFlags, ACTOR_SELF, LVar0)
890 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01)
891 Else
892 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01)
893 EndIf
894 Wait(5)
895 Thread
896 Wait(10)
897 Loop(4)
898 Call(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ)
899 Call(RandInt, 3, LVar0)
900 Add(LVar0, 3)
901 Wait(LVar0)
902 EndLoop
904 Thread
905 Call(FreezeBattleState, TRUE)
906 Call(ElectrifyActor, LVar8, 3)
907 Call(FreezeBattleState, FALSE)
909 Call(WaitForBuffDone)
910 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
911 Wait(10)
912 Call(YieldTurn)
913 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
914 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
915 Return
916 End
917};
Bytecode EvtScript[]
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ BS_FLAGS1_PARTNER_ACTING
Definition enums.h:3588
@ BS_FLAGS1_SUPER_HIT
Definition enums.h:3579
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3576
@ 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
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ ACTOR_EVENT_FLAG_RIDING_BROOMSTICK
Actor is on Magikoopa Broomstick, effect seems to be redundant.
Definition enums.h:3390
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ 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_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
@ EASING_COS_IN_OUT
Definition enums.h:520
@ EASING_LINEAR
Definition enums.h:510
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_STATIC
Definition enums.h:2813
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_TRANSPARENT
Definition enums.h:2825
@ SOUND_MAGIKOOPA_WAND_STRIKE
Definition enums.h:1054
@ SOUND_SPELL_CAST1
Definition enums.h:1498
@ SOUND_SPELL_CAST2
Definition enums.h:1499
@ SOUND_MAGIKOOPA_ELECTRIFY
Definition enums.h:1074
@ SOUND_MAGIKOOPA_VANISH
Definition enums.h:1053
@ SOUND_FALL_QUICK
Definition enums.h:1090
@ SOUND_ELECTRIC_BUZZ
Definition enums.h:1278
@ 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
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
@ 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_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_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_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_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_POW
Definition enums.h:2861
@ DAMAGE_TYPE_MAGIC
Definition enums.h:2855
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_ForceNextTarget
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define 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 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 Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#define LVar8
Definition macros.h:156
#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 LVar9
Definition macros.h:157
#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_VAR_Magikoopa_LastIndexBoosted
Definition battle.h:90