Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
bzzap.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/Bzzap.h"
4
5#define NAMESPACE A(bzzap)
6
7extern EvtScript N(EVS_Init);
8extern EvtScript N(EVS_Idle);
9extern EvtScript N(EVS_TakeTurn);
10extern EvtScript N(EVS_HandleEvent);
11
12enum N(ActorPartIDs) {
13 PRT_MAIN = 1,
14 PRT_SWARM_1 = 2,
15 PRT_SWARM_2 = 3,
16 PRT_SWARM_3 = 4,
17 PRT_SWARM_4 = 5,
18 PRT_SWARM_5 = 6,
19};
20
21enum N(ActorParams) {
22 DMG_STING = 6,
23 DMG_SWARM = 1,
24};
25
26s32 N(DefaultAnims)[] = {
27 STATUS_KEY_NORMAL, ANIM_Bzzap_Anim01,
28 STATUS_KEY_STONE, ANIM_Bzzap_Anim00,
29 STATUS_KEY_SLEEP, ANIM_Bzzap_Anim09,
30 STATUS_KEY_POISON, ANIM_Bzzap_Anim01,
31 STATUS_KEY_STOP, ANIM_Bzzap_Anim00,
32 STATUS_KEY_STATIC, ANIM_Bzzap_Anim01,
33 STATUS_KEY_PARALYZE, ANIM_Bzzap_Anim00,
34 STATUS_KEY_DIZZY, ANIM_Bzzap_Anim0A,
35 STATUS_KEY_FEAR, ANIM_Bzzap_Anim0A,
37};
38
39s32 N(DefenseTable)[] = {
42};
43
44s32 N(StatusTable)[] = {
67};
68
69ActorPartBlueprint N(ActorParts)[] = {
70 {
72 .index = PRT_MAIN,
73 .posOffset = { 0, 0, 0 },
74 .targetOffset = { -7, 33 },
75 .opacity = 255,
76 .idleAnimations = N(DefaultAnims),
77 .defenseTable = N(DefenseTable),
78 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
79 .elementImmunityFlags = 0,
80 .projectileTargetOffset = { 2, -10 },
81 },
82 {
84 .index = PRT_SWARM_1,
85 .posOffset = { 0, 0, 0 },
86 .targetOffset = { 0, 24 },
87 .opacity = 255,
88 .idleAnimations = N(DefaultAnims),
89 .defenseTable = N(DefenseTable),
90 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
91 .elementImmunityFlags = 0,
92 .projectileTargetOffset = { -1, -5 },
93 },
94 {
96 .index = PRT_SWARM_2,
97 .posOffset = { 0, 0, 0 },
98 .targetOffset = { 0, 24 },
99 .opacity = 255,
100 .idleAnimations = N(DefaultAnims),
101 .defenseTable = N(DefenseTable),
102 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
103 .elementImmunityFlags = 0,
104 .projectileTargetOffset = { -1, -5 },
105 },
106 {
108 .index = PRT_SWARM_3,
109 .posOffset = { 0, 0, 0 },
110 .targetOffset = { 0, 24 },
111 .opacity = 255,
112 .idleAnimations = N(DefaultAnims),
113 .defenseTable = N(DefenseTable),
114 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
115 .elementImmunityFlags = 0,
116 .projectileTargetOffset = { -1, -5 },
117 },
118 {
120 .index = PRT_SWARM_4,
121 .posOffset = { 0, 0, 0 },
122 .targetOffset = { 0, 24 },
123 .opacity = 255,
124 .idleAnimations = N(DefaultAnims),
125 .defenseTable = N(DefenseTable),
126 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
127 .elementImmunityFlags = 0,
128 .projectileTargetOffset = { -1, -5 },
129 },
130 {
132 .index = PRT_SWARM_5,
133 .posOffset = { 0, 0, 0 },
134 .targetOffset = { 0, 24 },
135 .opacity = 255,
136 .idleAnimations = N(DefaultAnims),
137 .defenseTable = N(DefenseTable),
138 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
139 .elementImmunityFlags = 0,
140 .projectileTargetOffset = { -1, -5 },
141 },
142};
143
144ActorBlueprint NAMESPACE = {
145 .flags = ACTOR_FLAG_FLYING,
146 .type = ACTOR_TYPE_BZZAP,
147 .level = ACTOR_LEVEL_BZZAP,
148 .maxHP = 3,
149 .partCount = ARRAY_COUNT(N(ActorParts)),
150 .partsData = N(ActorParts),
151 .initScript = &N(EVS_Init),
152 .statusTable = N(StatusTable),
153 .escapeChance = 40,
154 .airLiftChance = 95,
155 .hurricaneChance = 95,
156 .spookChance = 70,
157 .upAndAwayChance = 95,
158 .spinSmashReq = 0,
159 .powerBounceChance = 90,
160 .coinReward = 1,
161 .size = { 38, 38 },
162 .healthBarOffset = { 0, 0 },
163 .statusIconOffset = { -10, 20 },
164 .statusTextOffset = { 10, 20 },
165};
166
168
169API_CALLABLE(N(AddVecXZ)) {
170 Bytecode* args = script->ptrReadPos;
171 s32 prevX = evt_get_variable(script, *args++);
172 s32 prevZ = evt_get_variable(script, *args++);
173 s32 length = evt_get_variable(script, *args++);
174 s32 yaw = evt_get_variable(script, *args++);
175
176 f32 outX = prevX + (length * cos_deg(yaw));
177 f32 outZ = prevZ - (length * sin_deg(yaw));
178
179 evt_set_float_variable(script, *args++, outX);
180 evt_set_float_variable(script, *args++, outZ);
181 return ApiStatus_DONE2;
182}
183
184EvtScript N(EVS_Init) = {
185 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
186 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
187 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
188 Call(SetPartScale, ACTOR_SELF, PRT_SWARM_1, Float(0.4), Float(0.4), Float(0.4))
189 Call(SetPartScale, ACTOR_SELF, PRT_SWARM_2, Float(0.4), Float(0.4), Float(0.4))
190 Call(SetPartScale, ACTOR_SELF, PRT_SWARM_3, Float(0.4), Float(0.4), Float(0.4))
191 Call(SetPartScale, ACTOR_SELF, PRT_SWARM_4, Float(0.4), Float(0.4), Float(0.4))
192 Call(SetPartScale, ACTOR_SELF, PRT_SWARM_5, Float(0.4), Float(0.4), Float(0.4))
193 Return
194 End
195};
196
197EvtScript N(EVS_Idle) = {
198 Label(0)
199 Call(GetStatusFlags, ACTOR_SELF, LVarA)
201 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 19)
202 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -6)
203 Call(N(SetAbsoluteStatusOffsets), -20, 20, 10, 27)
204 Else
205 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 33)
206 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -10)
207 Call(N(SetAbsoluteStatusOffsets), -16, 22, 4, 22)
208 EndIf
209 Wait(1)
210 Goto(0)
211 Return
212 End
213};
214
215EvtScript N(EVS_ReturnHome) = {
216 Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0)
217 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03)
218 Call(SetGoalToHome, ACTOR_SELF)
219 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
220 Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT)
221 Return
222 End
223};
224
225EvtScript N(EVS_HandleEvent) = {
226 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
227 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
228 Call(GetLastEvent, ACTOR_SELF, LVar0)
232 SetConst(LVar0, PRT_MAIN)
233 SetConst(LVar1, ANIM_Bzzap_Anim06)
237 SetConst(LVar0, PRT_MAIN)
238 SetConst(LVar1, ANIM_Bzzap_Anim07)
239 SetConst(LVar2, ANIM_Bzzap_Anim08)
242 SetConst(LVar0, PRT_MAIN)
243 SetConst(LVar1, ANIM_Bzzap_Anim07)
244 SetConst(LVar2, ANIM_Bzzap_Anim08)
246 SetConst(LVar0, PRT_MAIN)
247 SetConst(LVar1, ANIM_Bzzap_Anim08)
249 Return
251 SetConst(LVar0, PRT_MAIN)
252 SetConst(LVar1, ANIM_Bzzap_Anim06)
255 SetConst(LVar0, PRT_MAIN)
256 SetConst(LVar1, ANIM_Bzzap_Anim06)
258 SetConst(LVar0, PRT_MAIN)
259 SetConst(LVar1, ANIM_Bzzap_Anim0B)
261 Return
263 SetConst(LVar0, PRT_MAIN)
264 SetConst(LVar1, ANIM_Bzzap_Anim06)
266 SetConst(LVar0, PRT_MAIN)
267 SetConst(LVar1, ANIM_Bzzap_Anim06)
269 ExecWait(N(EVS_ReturnHome))
271 SetConst(LVar0, PRT_MAIN)
272 SetConst(LVar1, ANIM_Bzzap_Anim06)
274 SetConst(LVar0, PRT_MAIN)
275 SetConst(LVar1, ANIM_Bzzap_Anim0B)
277 Return
281 SetConst(LVar0, PRT_MAIN)
282 SetConst(LVar1, ANIM_Bzzap_Anim01)
286 SetConst(LVar0, PRT_MAIN)
287 SetConst(LVar1, ANIM_Bzzap_Anim06)
289 Wait(10)
290 SetConst(LVar0, PRT_MAIN)
291 SetConst(LVar1, ANIM_Bzzap_Anim0B)
293 Return
295 Call(SetActorPos, ACTOR_SELF, 20, 0, 0)
296 Call(HPBarToCurrent, ACTOR_SELF)
298 ExecWait(N(EVS_ReturnHome))
299 Call(HPBarToHome, ACTOR_SELF)
301 SetConst(LVar0, PRT_MAIN)
302 SetConst(LVar1, ANIM_Bzzap_Anim01)
305 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE)
306 SetConst(LVar0, PRT_MAIN)
307 SetConst(LVar1, ANIM_Bzzap_Anim03)
308 SetConst(LVar2, ANIM_Bzzap_Anim06)
310 Return
312 SetConst(LVar0, PRT_MAIN)
313 SetConst(LVar1, ANIM_Bzzap_Anim01)
316 Call(GetStatusFlags, ACTOR_SELF, LVar0)
319 Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0)
320 Else
321 Call(SetActorDispOffset, ACTOR_SELF, 0, 9, 0)
322 EndIf
323 EndIf
324 SetConst(LVar0, PRT_MAIN)
325 SetConst(LVar1, ANIM_Bzzap_Anim06)
329 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
330 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
331 Return
332 End
333};
334
335EvtScript N(EVS_Attack_Sting) = {
336 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
337 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
338 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
339 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
340 Call(BattleCamTargetActor, ACTOR_SELF)
341 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
342 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03)
343 Call(SetGoalToTarget, ACTOR_SELF)
344 Call(AddGoalPos, ACTOR_SELF, 52, 10, 0)
345 Call(SetActorSpeed, ACTOR_SELF, Float(6.0))
346 Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_COS_IN)
347 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
351 Set(LVarA, LVar0)
352 Wait(10)
353 Call(SetGoalToTarget, ACTOR_SELF)
354 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
355 Add(LVar0, 20)
356 Add(LVar2, 1)
357 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
358 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
359 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT)
360 Wait(5)
361 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING)
362 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04)
363 Wait(10)
365 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
366 EndIf
367 Wait(15)
368 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
369 Call(YieldTurn)
370 Call(SetActorYaw, ACTOR_SELF, 180)
371 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
372 ExecWait(N(EVS_ReturnHome))
373 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
374 Call(SetActorYaw, ACTOR_SELF, 0)
375 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
376 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
377 Return
380 Wait(10)
381 Call(SetGoalToTarget, ACTOR_SELF)
382 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
383 Add(LVar0, 20)
384 Add(LVar2, 1)
385 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
386 Call(SetActorSpeed, ACTOR_SELF, Float(5.0))
387 Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT)
388 Wait(5)
389 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING)
390 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04)
391 Wait(6)
392 Wait(2)
393 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 40), DMG_STING, BS_FLAGS1_TRIGGER_EVENTS)
397 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
398 Wait(20)
399 Call(YieldTurn)
400 ExecWait(N(EVS_ReturnHome))
403 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
404 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
405 Return
406 End
407};
408
409EvtScript N(EVS_SummonSwarmPart) = {
410 Set(LVar9, LVar0)
411 Call(SetPartYaw, ACTOR_SELF, LVar9, 0)
412 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
413 Add(LVarA, 200)
414 Add(LVarB, 100)
415 Call(SetPartPos, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC)
416 Call(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, FALSE)
417 Call(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03)
418 Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC)
419 Add(LVarB, 50)
420 Sub(LVarC, 30)
421 Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0))
422 Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(1.0))
423 Call(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR)
424 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
425 Call(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
426 Call(MakeLerp, 90, 450, 50, EASING_LINEAR)
427 Label(0)
429 Call(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
430 Call(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
432 Call(SetPartYaw, ACTOR_SELF, LVar9, 180)
433 Else
434 Call(SetPartYaw, ACTOR_SELF, LVar9, 0)
435 EndIf
436 Wait(1)
437 IfEq(LVar1, 1)
438 Goto(0)
439 EndIf
440 Call(SetPartYaw, ACTOR_SELF, LVar9, 0)
441 IfEq(LVar9, 2)
442 Call(UseBattleCamPreset, BTL_CAM_ACTOR_SIMPLE)
443 Call(SetBattleCamDist, 400)
444 Call(SetBattleCamOffsetY, 30)
445 Call(BattleCamTargetActor, ACTOR_PLAYER)
446 Call(MoveBattleCamOver, 60)
447 EndIf
448 Call(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03)
449 Call(GetActorPos, ACTOR_PLAYER, LVarA, LVarB, LVarC)
450 Add(LVarB, 30)
451 Add(LVarC, 30)
452 Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0))
453 Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(1.0))
454 Call(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR)
455 Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
456 Call(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
457 Call(MakeLerp, -90, -720, 100, EASING_LINEAR)
458 Label(1)
460 Call(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8)
461 Call(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8)
463 Call(SetPartYaw, ACTOR_SELF, LVar9, 180)
464 Else
465 Call(SetPartYaw, ACTOR_SELF, LVar9, 0)
466 EndIf
467 Wait(1)
468 IfEq(LVar1, 1)
469 Goto(1)
470 EndIf
471 Return
472 End
473};
474
475EvtScript N(EVS_Attack_CallSwarm) = {
476 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
477 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
478 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
479 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
480 Call(BattleCamTargetActor, ACTOR_SELF)
481 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
482 Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_1, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
483 Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_2, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
484 Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
485 Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_4, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
486 Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_5, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE)
487 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_CALL_SWARM)
488 Call(SetActorYaw, ACTOR_SELF, 180)
489 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim05)
490 Wait(40)
491 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim01)
492 Call(SetActorYaw, ACTOR_SELF, 0)
494 Set(LVar0, PRT_SWARM_1)
495 ExecGetTID(N(EVS_SummonSwarmPart), LVarA)
496 Wait(11)
497 Set(LVar0, PRT_SWARM_2)
498 Exec(N(EVS_SummonSwarmPart))
499 Wait(11)
500 Set(LVar0, PRT_SWARM_3)
501 Exec(N(EVS_SummonSwarmPart))
502 Wait(11)
503 Set(LVar0, PRT_SWARM_4)
504 Exec(N(EVS_SummonSwarmPart))
505 Wait(11)
506 Set(LVar0, PRT_SWARM_5)
507 Exec(N(EVS_SummonSwarmPart))
508 Label(0)
510 Wait(1)
511 IfEq(LVar0, 1)
512 Goto(0)
513 EndIf
514 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS)
518 Set(LVarA, LVar0)
519 Thread
520 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING)
521 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04)
522 Call(SetGoalToTarget, ACTOR_SELF)
523 Call(AddGoalPos, ACTOR_SELF, -30, -20, 1)
524 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
525 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, Float(3.0))
526 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
527 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03)
528 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180)
529 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
530 Add(LVar1, 100)
531 Add(LVar2, 100)
532 Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0, ACTOR_DECORATION_SWEAT)
533 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
534 Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0)
535 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE)
537 Wait(11)
538 Thread
539 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING)
540 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04)
541 Call(SetGoalToTarget, ACTOR_SELF)
542 Call(AddGoalPos, ACTOR_SELF, -30, -20, 1)
543 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
544 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, Float(3.0))
545 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
546 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03)
547 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180)
548 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
549 Add(LVar1, 100)
550 Add(LVar2, 100)
551 Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0, ACTOR_DECORATION_SWEAT)
552 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
553 Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0)
554 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE)
556 Wait(11)
557 Thread
558 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING)
559 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04)
560 Call(SetGoalToTarget, ACTOR_SELF)
561 Call(AddGoalPos, ACTOR_SELF, -30, -20, 1)
562 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
563 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, Float(3.0))
564 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
565 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03)
566 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180)
567 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
568 Add(LVar1, 100)
569 Add(LVar2, 100)
570 Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0, ACTOR_DECORATION_SWEAT)
571 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
572 Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0)
573 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
575 Wait(11)
576 Thread
577 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING)
578 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04)
579 Call(SetGoalToTarget, ACTOR_SELF)
580 Call(AddGoalPos, ACTOR_SELF, -30, -20, 1)
581 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
582 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, Float(3.0))
583 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
584 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03)
585 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180)
586 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
587 Add(LVar1, 100)
588 Add(LVar2, 100)
589 Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0, ACTOR_DECORATION_SWEAT)
590 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
591 Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0)
592 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE)
594 Wait(11)
595 Thread
596 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING)
597 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04)
598 Call(SetGoalToTarget, ACTOR_SELF)
599 Call(AddGoalPos, ACTOR_SELF, -30, -20, 1)
600 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
601 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, Float(3.0))
602 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
603 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03)
604 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180)
605 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
606 Add(LVar1, 100)
607 Add(LVar2, 100)
608 Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0, ACTOR_DECORATION_SWEAT)
609 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
610 Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0)
611 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE)
613 Wait(11)
615 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
616 EndIf
617 Wait(30)
618 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
619 Wait(30)
621 Call(YieldTurn)
622 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
623 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
624 Return
627 Thread
628 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING)
629 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04)
630 Call(SetGoalToTarget, ACTOR_SELF)
631 Call(AddGoalPos, ACTOR_SELF, -10, -10, 1)
632 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
633 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, Float(3.0))
634 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
635 Wait(2)
636 Call(SetGoalToTarget, ACTOR_SELF)
637 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_INCLUDE_POWER_UPS)
638 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03)
639 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180)
640 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
641 Add(LVar1, 100)
642 Add(LVar2, 100)
643 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
644 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE)
646 Wait(11)
647 Thread
648 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING)
649 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04)
650 Call(SetGoalToTarget, ACTOR_SELF)
651 Call(AddGoalPos, ACTOR_SELF, -10, -10, 1)
652 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
653 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, Float(3.0))
654 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
655 Wait(2)
656 Call(SetGoalToTarget, ACTOR_SELF)
657 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT)
658 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03)
659 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180)
660 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
661 Add(LVar1, 100)
662 Add(LVar2, 100)
663 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
664 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE)
666 Wait(11)
667 Thread
668 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING)
669 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04)
670 Call(SetGoalToTarget, ACTOR_SELF)
671 Call(AddGoalPos, ACTOR_SELF, -10, -10, 1)
672 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
673 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, Float(3.0))
674 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
675 Wait(2)
676 Call(SetGoalToTarget, ACTOR_SELF)
677 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT)
678 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03)
679 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180)
680 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
681 Add(LVar1, 100)
682 Add(LVar2, 100)
683 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
684 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE)
686 Wait(11)
687 Thread
688 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING)
689 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04)
690 Call(SetGoalToTarget, ACTOR_SELF)
691 Call(AddGoalPos, ACTOR_SELF, -10, -10, 1)
692 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
693 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, Float(3.0))
694 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
695 Wait(2)
696 Call(SetGoalToTarget, ACTOR_SELF)
697 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT)
698 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03)
699 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180)
700 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
701 Add(LVar1, 100)
702 Add(LVar2, 100)
703 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
704 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE)
706 Wait(11)
707 Wait(1)
708 Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING)
709 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04)
710 Call(SetGoalToTarget, ACTOR_SELF)
711 Call(AddGoalPos, ACTOR_SELF, -10, -10, 1)
712 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
713 Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, Float(3.0))
714 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR)
715 Wait(2)
716 Call(SetGoalToTarget, ACTOR_SELF)
717 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS)
721 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
722 Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03)
723 Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180)
724 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
725 Add(LVar1, 100)
726 Add(LVar2, 100)
727 Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR)
728 Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE)
730 Call(YieldTurn)
733 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
734 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
735 Return
736 End
737};
738
739EvtScript N(EVS_TakeTurn) = {
740 Call(GetBattlePhase, LVar0)
742 ExecWait(N(EVS_Attack_Sting))
743 Return
744 EndIf
745 Call(RandInt, 1000, LVar0)
746 IfLt(LVar0, 500)
747 ExecWait(N(EVS_Attack_Sting))
748 Else
749 ExecWait(N(EVS_Attack_CallSwarm))
750 EndIf
751 Return
752 End
753};
Bytecode EvtScript[]
#define sin_deg
#define cos_deg
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_FLY
Definition enums.h:2035
@ 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
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ 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_ACTOR_SIMPLE
Definition enums.h:4830
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4885
@ EASING_SIN_OUT
Definition enums.h:521
@ EASING_COS_IN
Definition enums.h:522
@ EASING_QUADRATIC_OUT
Definition enums.h:514
@ 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
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ SOUND_NONE
Definition enums.h:547
@ SOUND_MINI_BZZAP_BUZZ
Definition enums.h:1162
@ SOUND_BZZAP_STING
Definition enums.h:1488
@ SOUND_MINI_BZZAP_STING
Definition enums.h:1489
@ SOUND_BZZAP_CALL_SWARM
Definition enums.h:1490
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4905
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_BEGIN_FIRST_STRIKE
Definition enums.h:2173
@ EVENT_END_FIRST_STRIKE
Definition enums.h:2171
@ 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_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ ACTOR_PART_FLAG_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
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
Definition evt.c:1977
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 PlaySound(Evt *script, b32 isInitialCall)
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus StopSound(Evt *script, b32 isInitialCall)
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define LVar6
Definition macros.h:154
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#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 LVarC
Definition macros.h:160
#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 IsThreadRunning(TID, OUTVAR)
Sets OUTVAR to TRUE/FALSE depending on whether a thread with the given ID exists (i....
Definition macros.h:540
#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 LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#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 DMG_STATUS_KEY(typeFlag, duration, chance)
Definition macros.h:224
#define LVar1
Definition macros.h:149
#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 ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
Definition macros.h:460
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#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 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 Exec(EVT_SOURCE)
Launches a new thread.
Definition macros.h:455
#define Return
Kills the current EVT thread.
Definition macros.h:217