Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
red_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(red_magikoopa)
8
9extern s32 N(GroundAnims)[];
10extern s32 N(FlyingAnims)[];
11extern s32 N(BroomAnims)[];
12
13extern EvtScript N(EVS_Init);
14extern EvtScript N(EVS_Init_Flying);
15extern EvtScript N(EVS_TakeTurn);
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 MAX_ATTACK_BOOST = 3,
32 ATTACK_BOOST_AMT = 1,
33};
34
35s32 N(DefenseTable)[] = {
38};
39
40s32 N(FlyingDefense)[] = {
43};
44
45s32 N(StatusTable)[] = {
68};
69
70s32 N(FlyingStatusTable)[] = {
93};
94
95ActorPartBlueprint N(GroundParts)[] = {
96 {
98 .index = PRT_GROUND,
99 .posOffset = { 0, 0, 0 },
100 .targetOffset = { 2, 35 },
101 .opacity = 255,
102 .idleAnimations = N(GroundAnims),
103 .defenseTable = N(DefenseTable),
104 .eventFlags = 0,
105 .elementImmunityFlags = 0,
106 .projectileTargetOffset = { -5, -12 },
107 },
108};
109
110ActorPartBlueprint N(FlyingParts)[] = {
111 {
113 .index = PRT_GROUND,
114 .posOffset = { 0, 0, 0 },
115 .targetOffset = { 2, 35 },
116 .opacity = 255,
117 .idleAnimations = N(GroundAnims),
118 .defenseTable = N(FlyingDefense),
120 .elementImmunityFlags = 0,
121 .projectileTargetOffset = { -5, -12 },
122 },
123 {
125 .index = PRT_FLYING,
126 .posOffset = { 0, 0, 0 },
127 .targetOffset = { -10, 35 },
128 .opacity = 255,
129 .idleAnimations = N(FlyingAnims),
130 .defenseTable = N(FlyingDefense),
131 .eventFlags = 0,
132 .elementImmunityFlags = 0,
133 .projectileTargetOffset = { 0, -8 },
134 },
135 {
137 .index = PRT_BROOM,
138 .posOffset = { 0, 0, 0 },
139 .targetOffset = { 0, 0 },
140 .opacity = 255,
141 .idleAnimations = N(BroomAnims),
142 .defenseTable = N(FlyingDefense),
143 .eventFlags = 0,
144 .elementImmunityFlags = 0,
145 .projectileTargetOffset = { 0, 0 },
146 },
147};
148
149ActorBlueprint NAMESPACE = {
150 .flags = 0,
151 .type = ACTOR_TYPE_RED_MAGIKOOPA,
152 .level = ACTOR_LEVEL_RED_MAGIKOOPA,
153 .maxHP = 11,
154 .partCount = ARRAY_COUNT(N(GroundParts)),
155 .partsData = N(GroundParts),
156 .initScript = &N(EVS_Init),
157 .statusTable = N(StatusTable),
158 .escapeChance = 40,
159 .airLiftChance = 80,
160 .hurricaneChance = 70,
161 .spookChance = 40,
162 .upAndAwayChance = 95,
163 .spinSmashReq = 0,
164 .powerBounceChance = 80,
165 .coinReward = 2,
166 .size = { 36, 40 },
167 .healthBarOffset = { 0, 0 },
168 .statusIconOffset = { -10, 20 },
169 .statusTextOffset = { 10, 32 },
170};
171
172ActorBlueprint N(flying) = {
173 .flags = ACTOR_FLAG_FLYING,
174 .type = ACTOR_TYPE_FLYING_RED_MAGIKOOPA,
175 .level = ACTOR_LEVEL_FLYING_RED_MAGIKOOPA,
176 .maxHP = 11,
177 .partCount = ARRAY_COUNT(N(FlyingParts)),
178 .partsData = N(FlyingParts),
179 .initScript = &N(EVS_Init_Flying),
180 .statusTable = N(FlyingStatusTable),
181 .escapeChance = 40,
182 .airLiftChance = 95,
183 .hurricaneChance = 75,
184 .spookChance = 40,
185 .upAndAwayChance = 95,
186 .spinSmashReq = 0,
187 .powerBounceChance = 80,
188 .coinReward = 2,
189 .size = { 48, 40 },
190 .healthBarOffset = { 0, 0 },
191 .statusIconOffset = { -25, 20 },
192 .statusTextOffset = { 1, 34 },
193};
194
195s32 N(GroundAnims)[] = {
196 STATUS_KEY_NORMAL, ANIM_Magikoopa_Red_Anim01,
197 STATUS_KEY_STONE, ANIM_Magikoopa_Red_Anim00,
198 STATUS_KEY_SLEEP, ANIM_Magikoopa_Red_Anim08,
199 STATUS_KEY_POISON, ANIM_Magikoopa_Red_Anim01,
200 STATUS_KEY_STOP, ANIM_Magikoopa_Red_Anim00,
201 STATUS_KEY_STATIC, ANIM_Magikoopa_Red_Anim01,
202 STATUS_KEY_PARALYZE, ANIM_Magikoopa_Red_Anim00,
203 STATUS_KEY_DIZZY, ANIM_Magikoopa_Red_Anim07,
204 STATUS_KEY_FEAR, ANIM_Magikoopa_Red_Anim07,
206};
207
208s32 N(FlyingAnims)[] = {
209 STATUS_KEY_NORMAL, ANIM_FlyingMagikoopa_Red_Anim01,
210 STATUS_KEY_STONE, ANIM_FlyingMagikoopa_Red_Anim00,
211 STATUS_KEY_SLEEP, ANIM_FlyingMagikoopa_Red_Anim08,
212 STATUS_KEY_POISON, ANIM_FlyingMagikoopa_Red_Anim01,
213 STATUS_KEY_STOP, ANIM_FlyingMagikoopa_Red_Anim00,
214 STATUS_KEY_STATIC, ANIM_FlyingMagikoopa_Red_Anim01,
215 STATUS_KEY_PARALYZE, ANIM_FlyingMagikoopa_Red_Anim00,
216 STATUS_KEY_DIZZY, ANIM_FlyingMagikoopa_Red_Anim07,
217 STATUS_KEY_FEAR, ANIM_FlyingMagikoopa_Red_Anim07,
219};
220
221s32 N(BroomAnims)[] = {
222 STATUS_KEY_NORMAL, ANIM_FlyingMagikoopa_Red_Anim0A,
224};
225
226EvtScript N(EVS_Idle) = {
227 Return
228 End
229};
230
236
237EvtScript N(EVS_HandleEvent) = {
238 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
239 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
240 Call(GetLastEvent, ACTOR_SELF, LVar0)
244 SetConst(LVar0, PRT_GROUND)
245 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
249 SetConst(LVar0, PRT_GROUND)
250 SetConst(LVar1, ANIM_Magikoopa_Red_Anim05)
251 SetConst(LVar2, ANIM_Magikoopa_Red_Anim06)
254 SetConst(LVar0, PRT_GROUND)
255 SetConst(LVar1, ANIM_Magikoopa_Red_Anim05)
256 SetConst(LVar2, ANIM_Magikoopa_Red_Anim06)
258 SetConst(LVar0, PRT_GROUND)
259 SetConst(LVar1, ANIM_Magikoopa_Red_Anim06)
261 Return
263 SetConst(LVar0, PRT_GROUND)
264 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
267 SetConst(LVar0, PRT_GROUND)
268 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
270 SetConst(LVar0, PRT_GROUND)
271 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
273 Return
277 SetConst(LVar0, PRT_GROUND)
278 SetConst(LVar1, ANIM_Magikoopa_Red_Anim01)
282 SetConst(LVar0, PRT_GROUND)
283 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
285 Wait(10)
286 SetConst(LVar0, PRT_GROUND)
287 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
289 Return
291 SetConst(LVar0, PRT_GROUND)
292 SetConst(LVar1, ANIM_Magikoopa_Red_Anim01)
295 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04)
296 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5))
297 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
298 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
299 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
300 Wait(15)
301 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02)
302 ExecWait(N(EVS_Flee))
303 Return
305 SetConst(LVar0, PRT_GROUND)
306 SetConst(LVar1, ANIM_Magikoopa_Red_Anim02)
309 Call(GetStatusFlags, ACTOR_SELF, LVar0)
312 Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0)
313 Else
314 Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0)
315 EndIf
316 EndIf
317 SetConst(LVar0, PRT_GROUND)
318 SetConst(LVar1, ANIM_Magikoopa_Red_Anim04)
320 Return
323 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
324 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
325 Return
326 End
327};
328
329EvtScript N(EVS_KnockDownCheck) = {
330 Call(GetBattleFlags, LVar0)
333 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
334 EndIf
335 Else
336 Call(N(GetSelectedMoveID), LVar0)
338 CaseOrEq(MOVE_HEADBONK1)
339 CaseOrEq(MOVE_HEADBONK2)
340 CaseOrEq(MOVE_HEADBONK3)
341 CaseOrEq(MOVE_MULTIBONK)
342 Call(GetBattleFlags, LVar0)
344 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
345 EndIf
348 EndIf
349 Return
350 End
351};
352
353EvtScript N(EVS_KnockDown) = {
354 Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0)
355 IfEq(LVar0, 1)
356 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04)
357 Goto(0)
358 EndIf
359 Call(GetLastElement, LVar0)
361 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04)
362 Goto(0)
363 EndIf
364 Return
365 Label(0)
366 Call(HideHealthBar, ACTOR_SELF)
367 Call(GetStatusFlags, ACTOR_SELF, LVar0)
369 Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4))
370 EndIf
371 Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
372 Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE)
373 Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE)
374 Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
375 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE)
376 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE)
377 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
378 Sub(LVar2, 1)
379 Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2)
380 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK)
381 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
382 Set(LVar1, 0)
383 Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8))
384 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
385 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
386 Call(N(StartRumbleWithParams), 150, 10)
387 Thread
388 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7))
390 Call(GetLastEvent, ACTOR_SELF, LVar3)
392 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04)
393 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
394 Add(LVar4, 10)
395 Add(LVar5, 5)
396 PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0)
397 EndIf
398 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
399 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
400 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
401 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
402 Loop(20)
403 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE)
404 Wait(1)
405 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE)
406 Wait(1)
407 EndLoop
408 Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE)
409 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01)
410 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
411 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
412 Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA)
413 Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable)))
414 Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32)
415 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE)
416 Call(ResetAllActorSounds, ACTOR_SELF)
417 Call(GetIndexFromPos, ACTOR_SELF, LVar0)
418 Mod(LVar0, 4)
419 Call(SetGoalToIndex, ACTOR_SELF, LVar0)
420 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
421 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
422 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
423 Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2)
424 Call(HPBarToHome, ACTOR_SELF)
425 Return
426 End
427};
428
429EvtScript N(EVS_HandleEvent_Flying) = {
430 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
431 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
432 Call(GetLastEvent, ACTOR_SELF, LVar0)
435 ExecWait(N(EVS_KnockDownCheck))
436 SetConst(LVar0, PRT_FLYING)
437 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
441 ExecWait(N(EVS_KnockDownCheck))
442 SetConst(LVar0, PRT_FLYING)
443 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
445 ExecWait(N(EVS_KnockDown))
449 ExecWait(N(EVS_KnockDownCheck))
450 SetConst(LVar0, PRT_FLYING)
451 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim05)
452 SetConst(LVar2, ANIM_FlyingMagikoopa_Red_Anim06)
454 ExecWait(N(EVS_KnockDown))
457 SetConst(LVar0, PRT_FLYING)
458 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim05)
459 SetConst(LVar2, ANIM_FlyingMagikoopa_Red_Anim06)
461 SetConst(LVar0, PRT_FLYING)
462 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim06)
464 Return
466 SetConst(LVar0, PRT_FLYING)
467 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
470 SetConst(LVar0, PRT_FLYING)
471 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
473 SetConst(LVar0, PRT_FLYING)
474 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
476 Return
480 SetConst(LVar0, PRT_FLYING)
481 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim01)
485 SetConst(LVar0, PRT_FLYING)
486 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
488 Wait(10)
489 SetConst(LVar0, PRT_FLYING)
490 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
492 Return
494 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
495 Call(HPBarToCurrent, ACTOR_SELF)
497 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01)
498 Call(SetGoalToHome, ACTOR_SELF)
499 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
500 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR)
501 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01)
502 Call(HPBarToHome, ACTOR_SELF)
504 SetConst(LVar0, PRT_FLYING)
505 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim01)
508 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim04)
509 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5))
510 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
511 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
512 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
513 Wait(15)
514 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02)
515 ExecWait(N(EVS_Flee))
516 Return
518 SetConst(LVar0, PRT_FLYING)
519 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim02)
522 Call(GetStatusFlags, ACTOR_SELF, LVar0)
525 Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0)
526 Else
527 Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0)
528 EndIf
529 EndIf
530 SetConst(LVar0, PRT_FLYING)
531 SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04)
533 Return
536 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
537 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
538 Return
539 End
540};
541
542EvtScript N(EVS_Attack_MagicBlast) = {
543 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
544 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
545 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
546 Call(GetBattlePhase, LVar0)
548 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
549 Call(MoveBattleCamOver, 1)
550 Else
551 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
552 Call(MoveBattleCamOver, 10)
553 EndIf
554 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
555 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
556 Call(GetStatusFlags, ACTOR_SELF, LVarA)
558 Sub(LVar0, 12)
559 Add(LVar1, 14)
560 Else
561 Sub(LVar0, 30)
562 Add(LVar1, 36)
563 EndIf
564 PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0)
565 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02)
566 Wait(30)
567 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
571 Set(LVarA, LVar0)
572 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
573 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03)
574 Wait(5)
575 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
576 Call(GetStatusFlags, ACTOR_SELF, LVar9)
578 Sub(LVar0, 8)
579 Add(LVar1, 8)
580 Else
581 Sub(LVar0, 20)
582 Add(LVar1, 20)
583 EndIf
584 Call(SetGoalToTarget, ACTOR_SELF)
585 Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
586 Sub(LVar3, 50)
587 Set(LVar4, 0)
588 Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25)
589 Wait(50)
591 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
592 EndIf
593 Wait(14)
594 Call(YieldTurn)
595 Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT)
596 Wait(30)
597 Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0)
598 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
599 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
600 Return
603 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2)
604 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03)
605 Wait(5)
606 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
607 Call(GetStatusFlags, ACTOR_SELF, LVarA)
609 Sub(LVar0, 8)
610 Add(LVar1, 8)
611 Else
612 Sub(LVar0, 20)
613 Add(LVar1, 20)
614 EndIf
615 Call(SetGoalToTarget, ACTOR_SELF)
616 Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5)
617 Sub(LVar3, 10)
618 Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20)
619 Wait(18)
620 Wait(2)
621 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS)
625 Wait(19)
626 Call(YieldTurn)
629 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
630 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
631 Return
632 End
633};
634
635EvtScript N(EVS_Attack_WandStrike) = {
636 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
637 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
638 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
639 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
640 Call(BattleCamTargetActor, ACTOR_SELF)
641 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
642 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH)
643 Thread
644 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02)
645 Set(LVar0, 200)
646 Loop(20)
647 Sub(LVar0, 10)
648 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
649 Wait(1)
650 EndLoop
652 Wait(10)
653 Call(SetGoalToTarget, ACTOR_SELF)
654 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
655 Call(GetStatusFlags, ACTOR_SELF, LVarA)
657 Add(LVar0, 5)
658 Else
659 Add(LVar0, 25)
660 EndIf
661 Set(LVar1, 0)
662 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
663 Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT)
664 Set(LVar0, 55)
665 Loop(20)
666 Add(LVar0, 10)
667 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
668 Wait(1)
669 EndLoop
670 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
671 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim03)
672 Wait(11)
674 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
678 Set(LVarA, LVar0)
679 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
681 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
682 EndIf
683 Wait(15)
684 Set(LVar0, 200)
685 Loop(20)
686 Sub(LVar0, 10)
687 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
688 Wait(1)
689 EndLoop
690 Call(YieldTurn)
691 Call(SetGoalToHome, ACTOR_SELF)
692 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01)
693 Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT)
694 Set(LVar0, 55)
695 Loop(20)
696 Add(LVar0, 10)
697 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
698 Wait(1)
699 EndLoop
700 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
701 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
702 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
703 Return
706 Call(SetGoalToTarget, ACTOR_SELF)
707 Wait(2)
708 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS)
712 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
713 Wait(10)
714 Set(LVar0, 200)
715 Loop(20)
716 Sub(LVar0, 10)
717 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
718 Wait(1)
719 EndLoop
720 Call(YieldTurn)
721 Call(SetGoalToHome, ACTOR_SELF)
722 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01)
723 Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT)
724 Set(LVar0, 55)
725 Loop(20)
726 Add(LVar0, 10)
727 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0)
728 Wait(1)
729 EndLoop
730 Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255)
733 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
734 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
735 Return
736 End
737};
738
739EvtScript N(EVS_Flee) = {
740 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
741 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
742 Call(HideHealthBar, ACTOR_SELF)
743 Call(GetLastEvent, ACTOR_SELF, LVar0)
745 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
746 Call(BattleCamTargetActor, ACTOR_SELF)
747 Call(MoveBattleCamOver, 15)
748 Wait(15)
749 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
750 EndIf
751 Call(SetActorSpeed, ACTOR_SELF, Float(1.0))
752 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
753 Add(LVar0, 20)
754 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
755 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
756 Wait(10)
757 Call(SetActorYaw, ACTOR_SELF, 180)
758 Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE)
759 Call(SetActorSpeed, ACTOR_SELF, Float(10.0))
760 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
761 Add(LVar0, 200)
762 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
763 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
764 Call(YieldTurn)
765 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
767 Call(HideHealthBar, ACTOR_SELF)
768 Call(RemoveActor, ACTOR_SELF)
769 Return
770 End
771};
772
773EvtScript N(EVS_Init) = {
774 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
775 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
776 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
778 IfEq(LVar0, 0)
780 EndIf
781 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE)
782 Return
783 End
784};
785
786EvtScript N(EVS_Init_Flying) = {
787 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
788 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
789 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying)))
791 IfEq(LVar0, 0)
793 EndIf
794 Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE)
795 Return
796 End
797};
798
799EvtScript N(EVS_TakeTurn) = {
800 Set(LFlag0, FALSE)
801 Label(10)
802 Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
803 Call(InitTargetIterator)
804 Label(0)
805 Call(GetOwnerTarget, LVar0, LVar1)
806 Call(GetIndexFromHome, LVar0, LVar1)
809 Call(N(CheckMagikoopaCastTarget), LVar0, LVar3)
810 IfEq(LVar3, 0)
811 Call(GetActorAttackBoost, LVar0, LVar4)
812 IfLt(LVar4, MAX_ATTACK_BOOST)
813 Set(LVar8, LVar0)
815 Goto(100)
816 EndIf
817 EndIf
818 EndIf
819 Call(ChooseNextTarget, ITER_NEXT, LVar0)
821 Goto(0)
822 EndIf
823 IfEq(LFlag0, FALSE)
824 Set(LFlag0, TRUE)
826 Goto(10)
827 EndIf
829 IfEq(LVar0, 1)
830 ExecWait(N(EVS_Flee))
831 Return
832 EndIf
833 Call(GetActorFlags, ACTOR_SELF, LVar0)
835 ExecWait(N(EVS_Attack_MagicBlast))
836 Else
837 ExecWait(N(EVS_Attack_WandStrike))
838 EndIf
839 Return
840 Label(100)
841 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
842 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
843 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
844 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
845 Call(BattleCamTargetActor, ACTOR_SELF)
846 Call(MoveBattleCamOver, 15)
847 Wait(15)
848 Call(GetActorFlags, ACTOR_SELF, LVar0)
850 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02)
851 Else
852 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02)
853 EndIf
854 Wait(5)
855 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1)
856 Call(GetActorFlags, ACTOR_SELF, LVar0)
858 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
859 Call(GetStatusFlags, ACTOR_SELF, LVarA)
861 Sub(LVar0, 6)
862 Add(LVar1, 12)
863 Sub(LVar2, 2)
864 PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0)
865 Else
866 Sub(LVar0, 16)
867 Add(LVar1, 31)
868 Sub(LVar2, 2)
869 PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0)
870 EndIf
871 Else
872 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
873 Call(GetStatusFlags, ACTOR_SELF, LVarA)
875 Sub(LVar0, 12)
876 Add(LVar1, 14)
877 Sub(LVar2, 2)
878 PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0)
879 Else
880 Sub(LVar0, 30)
881 Add(LVar1, 36)
882 Sub(LVar2, 2)
883 PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0)
884 EndIf
885 EndIf
886 Wait(30)
887 Call(GetActorFlags, ACTOR_SELF, LVar0)
889 Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01)
890 Else
891 Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01)
892 EndIf
893 Wait(5)
894 Thread
895 Wait(10)
896 Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP)
898 Thread
899 Call(FreezeBattleState, TRUE)
900 Call(BoostAttack, LVar8, ATTACK_BOOST_AMT)
901 Call(FreezeBattleState, FALSE)
903 Call(WaitForBuffDone)
904 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
905 Wait(10)
906 Call(YieldTurn)
907 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
908 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
909 Return
910 End
911};
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_SHRINK
Definition enums.h:2819
@ SOUND_MAGIKOOPA_WAND_STRIKE
Definition enums.h:1054
@ SOUND_SPELL_CAST1
Definition enums.h:1498
@ SOUND_SPELL_CAST2
Definition enums.h:1499
@ SOUND_MAGIKOOPA_VANISH
Definition enums.h:1053
@ SOUND_FALL_QUICK
Definition enums.h:1090
@ SOUND_MAGIKOOPA_POWER_UP
Definition enums.h:1055
@ 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 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 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 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