Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
hyper_cleft.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "sprite/npc/Cleft.h"
4
5#define NAMESPACE A(hyper_cleft)
6
7extern s32 N(UprightAnims)[];
8extern EvtScript N(EVS_Init);
9extern EvtScript N(EVS_Idle);
10extern EvtScript N(EVS_TakeTurn);
11extern EvtScript N(EVS_TakeTurn_Unused);
12extern EvtScript N(EVS_HandleEvent);
13extern EvtScript N(EVS_HandlePhase);
14extern EvtScript N(EVS_TryGettingUp);
15extern EvtScript N(EVS_Attack_Tackle);
16
17enum N(ActorPartIDs) {
18 PRT_MAIN = 1,
19};
20
21enum N(ActorVars) {
22 AVAR_State = 0,
23 AVAL_State_Normal = 0,
24 AVAL_State_Toppled = 1,
25 AVAL_State_Charged = 2,
26 AVAL_State_ChargedToppled = 3,
27 AVAR_ToppleTurns = 1,
28 AVAR_NotFirstTurn = 2,
29};
30
31enum N(ActorParams) {
32 DMG_TACKLE = 3,
33 DMG_CHARGED = 8,
34};
35
36s32 N(UprightDefenseTable)[] = {
38 ELEMENT_FIRE, 99,
40};
41
42s32 N(ToppledDefenseTable)[] = {
44 ELEMENT_FIRE, 99,
46};
47
48s32 N(StatusTable)[] = {
71};
72
73ActorPartBlueprint N(ActorParts)[] = {
74 {
76 .index = PRT_MAIN,
77 .posOffset = { 0, 0, 0 },
78 .targetOffset = { 0, 22 },
79 .opacity = 255,
80 .idleAnimations = N(UprightAnims),
81 .defenseTable = N(UprightDefenseTable),
82 .eventFlags = ACTOR_EVENT_FLAG_SPIKY_TOP,
83 .elementImmunityFlags = 0,
84 .projectileTargetOffset = { 0, -10 },
85 },
86};
87
88ActorBlueprint NAMESPACE = {
89 .flags = 0,
90 .type = ACTOR_TYPE_HYPER_CLEFT,
91 .level = ACTOR_LEVEL_HYPER_CLEFT,
92 .maxHP = 4,
93 .partCount = ARRAY_COUNT(N(ActorParts)),
94 .partsData = N(ActorParts),
95 .initScript = &N(EVS_Init),
96 .statusTable = N(StatusTable),
97 .escapeChance = 70,
98 .airLiftChance = 30,
99 .hurricaneChance = 30,
100 .spookChance = 30,
101 .upAndAwayChance = 95,
102 .spinSmashReq = 0,
103 .powerBounceChance = 95,
104 .coinReward = 2,
105 .size = { 44, 36 },
106 .healthBarOffset = { 0, 0 },
107 .statusIconOffset = { -10, 20 },
108 .statusTextOffset = { 10, 20 },
109};
110
111s32 N(HyperAnims)[] = {
112 STATUS_KEY_NORMAL, ANIM_Cleft_Hyper_Anim04,
113 STATUS_KEY_STONE, ANIM_Cleft_Hyper_Anim00,
114 STATUS_KEY_SLEEP, ANIM_Cleft_Hyper_Anim0C,
115 STATUS_KEY_POISON, ANIM_Cleft_Hyper_Anim04,
116 STATUS_KEY_STOP, ANIM_Cleft_Hyper_Anim00,
117 STATUS_KEY_STATIC, ANIM_Cleft_Hyper_Anim04,
118 STATUS_KEY_PARALYZE, ANIM_Cleft_Hyper_Anim00,
119 STATUS_KEY_DIZZY, ANIM_Cleft_Hyper_Anim0E,
120 STATUS_KEY_FEAR, ANIM_Cleft_Hyper_Anim0E,
122};
123
124EvtScript N(EVS_Init) = {
125 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
126 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
127 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
128 Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase)))
129 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
130 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE)
131 Return
132 End
133};
134
135EvtScript N(EVS_HandlePhase) = {
136 Call(GetBattlePhase, LVar0)
142 Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE)
144 Return
145 End
146};
147
149
150EvtScript N(EVS_Move_Charge) = {
151 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
152 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
153 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
154 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
155 IfEq(LVar0, AVAL_State_Normal)
156 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
157 Call(BattleCamTargetActor, ACTOR_SELF)
158 Call(MoveBattleCamOver, 20)
159 Wait(20)
160 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP)
161 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
162 Add(LVar1, 10)
163 PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0)
164 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim04)
165 Wait(30)
166 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
167 Call(MoveBattleCamOver, 20)
168 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
169 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
170 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
171 Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE)
172 Call(N(StartRumbleWithParams), 200, 10)
173 Thread
174 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5))
176 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_LAND)
177 PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0)
178 Thread
179 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
181 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged)
182 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims)))
183 Call(EnableActorGlow, ACTOR_SELF, TRUE)
184 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE)
185 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
186 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
187 Return
188 EndIf
189 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
190 Call(BattleCamTargetActor, ACTOR_SELF)
191 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
192 Call(MoveBattleCamOver, 30)
193 Loop(20)
194 Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0)
195 Wait(1)
196 Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0)
197 Wait(1)
198 EndLoop
199 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
200 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_CHARGE)
202 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS)
206 Set(LVarA, LVar0)
207 Thread
208 Loop(0)
209 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
210 Add(LVar0, 30)
211 Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5)
214 EndIf
215 Wait(1)
216 EndLoop
217 Call(UseBattleCamPreset, BTL_CAM_INTERRUPT)
219 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
220 EndIf
221 Wait(15)
222 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
224 Thread
225 Loop(30)
226 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
227 PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0)
228 Wait(1)
229 EndLoop
231 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11)
232 Call(SetGoalToTarget, ACTOR_SELF)
233 Call(AddGoalPos, ACTOR_SELF, -200, 0, 0)
234 Call(SetActorSpeed, ACTOR_SELF, Float(12.0))
235 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
236 Wait(15)
237 Call(EnableActorGlow, ACTOR_SELF, FALSE)
238 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
239 Call(YieldTurn)
240 Call(ResetAllActorSounds, ACTOR_SELF)
241 Call(SetActorPos, ACTOR_SELF, 300, 0, 0)
242 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
243 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07)
244 Call(SetGoalToHome, ACTOR_SELF)
245 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
246 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
247 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
248 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
249 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
250 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
251 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
252 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
253 Return
256 Thread
257 Loop(25)
258 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
259 PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0)
260 Wait(1)
261 EndLoop
263 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11)
264 Call(SetGoalToTarget, ACTOR_SELF)
265 Call(SetActorSpeed, ACTOR_SELF, Float(12.0))
266 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
267 Call(ResetAllActorSounds, ACTOR_SELF)
268 Wait(2)
269 Call(SetGoalToTarget, ACTOR_SELF)
270 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED, BS_FLAGS1_TRIGGER_EVENTS)
274 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
275 Thread
276 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
277 Set(LVar0, 0)
278 Loop(60)
279 Add(LVar0, 18)
280 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
281 Wait(1)
282 EndLoop
283 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
284 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
286 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0))
287 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
288 Sub(LVar0, 50)
289 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
290 Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE)
291 Sub(LVar0, 40)
292 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
293 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
294 Sub(LVar0, 30)
295 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
296 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
297 Wait(20)
298 Call(YieldTurn)
299 Call(EnableActorGlow, ACTOR_SELF, FALSE)
300 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
301 Call(SetActorYaw, ACTOR_SELF, 180)
302 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07)
303 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
304 Call(SetGoalToHome, ACTOR_SELF)
305 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
306 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
307 Call(SetActorYaw, ACTOR_SELF, 0)
308 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
309 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
312 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
313 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
314 Return
315 End
316};
317
318EvtScript N(EVS_TakeTurn) = {
319 Call(GetBattlePhase, LVar0)
322 ExecWait(N(EVS_Attack_Tackle))
323 Return
324 EndIf
325 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
326 IfEq(LVar0, AVAL_State_Toppled)
327 ExecWait(N(EVS_TryGettingUp))
328 Return
329 EndIf
330 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
331 IfEq(LVar0, AVAL_State_Charged)
332 ExecWait(N(EVS_Move_Charge))
333 Return
334 EndIf
335 Call(GetBattleVar, BTL_VAR_HyperSync, LVar0)
338 Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0)
339 IfEq(LVar0, 0)
340 Call(RandInt, 1000, LVar0)
341 IfLt(LVar0, 750)
343 ExecWait(N(EVS_Move_Charge))
344 Else
346 ExecWait(N(EVS_Attack_Tackle))
347 EndIf
348 Else
349 Call(RandInt, 1000, LVar0)
350 IfLt(LVar0, 500)
352 ExecWait(N(EVS_Move_Charge))
353 Else
355 ExecWait(N(EVS_Attack_Tackle))
356 EndIf
357 EndIf
359 ExecWait(N(EVS_Attack_Tackle))
360 Return
362 ExecWait(N(EVS_Move_Charge))
363 Return
365 Return
366 End
367};
368
369// everything below this point is copied from the basic Cleft actor
370
371s32 N(UprightAnims)[] = {
372 STATUS_KEY_NORMAL, ANIM_Cleft_Hyper_Anim02,
373 STATUS_KEY_STONE, ANIM_Cleft_Hyper_Anim00,
374 STATUS_KEY_SLEEP, ANIM_Cleft_Hyper_Anim0C,
375 STATUS_KEY_POISON, ANIM_Cleft_Hyper_Anim02,
376 STATUS_KEY_STOP, ANIM_Cleft_Hyper_Anim00,
377 STATUS_KEY_STATIC, ANIM_Cleft_Hyper_Anim02,
378 STATUS_KEY_PARALYZE, ANIM_Cleft_Hyper_Anim00,
379 STATUS_KEY_DIZZY, ANIM_Cleft_Hyper_Anim0E,
380 STATUS_KEY_FEAR, ANIM_Cleft_Hyper_Anim0E,
382};
383
384s32 N(ToppledAnims)[] = {
385 STATUS_KEY_NORMAL, ANIM_Cleft_Hyper_Anim05,
386 STATUS_KEY_STONE, ANIM_Cleft_Hyper_Anim01,
387 STATUS_KEY_SLEEP, ANIM_Cleft_Hyper_Anim0D,
388 STATUS_KEY_POISON, ANIM_Cleft_Hyper_Anim05,
389 STATUS_KEY_STOP, ANIM_Cleft_Hyper_Anim01,
390 STATUS_KEY_STATIC, ANIM_Cleft_Hyper_Anim05,
391 STATUS_KEY_PARALYZE, ANIM_Cleft_Hyper_Anim01,
392 STATUS_KEY_DIZZY, ANIM_Cleft_Hyper_Anim0F,
393 STATUS_KEY_FEAR, ANIM_Cleft_Hyper_Anim0F,
395};
396
397EvtScript N(EVS_Init_Unused) = {
398 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
399 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Unused)))
400 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
401 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
402 Return
403 End
404};
405
406EvtScript N(EVS_Idle) = {
407 Return
408 End
409};
410
412
413EvtScript N(EVS_FlipOver) = {
414 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled)
415 Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 2)
416 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07)
417 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
418 Thread
419 Set(LVar0, 0)
420 Loop(5)
421 Add(LVar0, -36)
422 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
423 Wait(1)
424 EndLoop
426 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
427 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3))
428 Sub(LVar1, 6)
429 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
430 Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE)
431 Call(N(StartRumbleWithParams), 200, 10)
432 Thread
433 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
435 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 40, 8, Float(0.0), 20, 0)
436 Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2)
437 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
438 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
439 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03)
440 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims)))
441 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable)))
442 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 15)
443 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -7)
444 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE)
445 Call(N(SetSpinSmashable), FALSE)
446 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE)
447 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
448 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
449 Call(EnableActorGlow, ACTOR_SELF, FALSE)
450 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
451 Return
452 End
453};
454
455EvtScript N(EVS_HandleEvent) = {
456 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
457 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
458 Call(GetLastEvent, ACTOR_SELF, LVar0)
462 Call(GetLastElement, LVar0)
465 ExecWait(N(EVS_FlipOver))
467 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
468 IfEq(LVar0, AVAL_State_Toppled)
469 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
470 Else
471 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
472 EndIf
473 SetConst(LVar0, PRT_MAIN)
478 Call(GetLastElement, LVar0)
481 ExecWait(N(EVS_FlipOver))
483 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE)
484 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
485 IfEq(LVar0, AVAL_State_Toppled)
486 SetConst(LVar0, PRT_MAIN)
487 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
488 SetConst(LVar2, -1)
490 Else
491 SetConst(LVar0, PRT_MAIN)
492 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
493 SetConst(LVar2, -1)
495 EndIf
496 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE)
499 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
500 IfEq(LVar0, AVAL_State_Toppled)
501 SetConst(LVar0, PRT_MAIN)
502 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
503 SetConst(LVar2, -1)
505 SetConst(LVar0, PRT_MAIN)
506 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
508 Else
509 SetConst(LVar0, PRT_MAIN)
510 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
511 SetConst(LVar2, -1)
513 SetConst(LVar0, PRT_MAIN)
514 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
516 EndIf
517 Return
519 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
520 IfEq(LVar0, AVAL_State_Toppled)
521 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
522 Else
523 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
524 EndIf
525 SetConst(LVar0, PRT_MAIN)
528 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
529 IfEq(LVar0, AVAL_State_Toppled)
530 SetConst(LVar0, PRT_MAIN)
531 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
533 SetConst(LVar0, PRT_MAIN)
534 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
536 Else
537 SetConst(LVar0, PRT_MAIN)
538 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
540 SetConst(LVar0, PRT_MAIN)
541 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
543 EndIf
544 Return
546 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
547 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
548 Call(EnableActorGlow, ACTOR_SELF, FALSE)
549 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
550 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
551 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
552 SetConst(LVar0, PRT_MAIN)
553 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
555 SetConst(LVar0, PRT_MAIN)
556 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
558 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
559 SetConst(LVar0, PRT_MAIN)
560 SetConst(LVar1, ANIM_Cleft_Hyper_Anim07)
562 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6))
563 Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE)
565 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
566 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
567 Call(EnableActorGlow, ACTOR_SELF, FALSE)
568 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
569 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
570 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
571 SetConst(LVar0, PRT_MAIN)
572 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
574 SetConst(LVar0, PRT_MAIN)
575 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
577 Return
579 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
580 IfEq(LVar0, AVAL_State_Charged)
581 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
582 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
583 Call(EnableActorGlow, ACTOR_SELF, FALSE)
584 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE)
585 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
586 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
587 EndIf
588 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
589 IfEq(LVar0, AVAL_State_Toppled)
590 SetConst(LVar1, ANIM_Cleft_Hyper_Anim03)
591 Else
592 SetConst(LVar1, ANIM_Cleft_Hyper_Anim02)
593 EndIf
594 SetConst(LVar0, PRT_MAIN)
597 Call(GetStatusFlags, ACTOR_SELF, LVar0)
599 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim18)
600 EndIf
601 Wait(10)
602 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
603 Call(GetStatusFlags, ACTOR_SELF, LVar3)
605 Add(LVar0, -3)
606 Add(LVar1, 10)
607 Else
608 Add(LVar0, -8)
609 Add(LVar1, 27)
610 EndIf
611 PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0)
612 Wait(20)
616 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
617 IfEq(LVar0, AVAL_State_Toppled)
618 SetConst(LVar1, ANIM_Cleft_Hyper_Anim03)
619 Else
620 SetConst(LVar1, ANIM_Cleft_Hyper_Anim02)
621 EndIf
622 SetConst(LVar0, PRT_MAIN)
626 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
627 IfEq(LVar0, AVAL_State_Toppled)
628 SetConst(LVar0, PRT_MAIN)
629 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
631 Wait(10)
632 SetConst(LVar0, PRT_MAIN)
633 SetConst(LVar1, ANIM_Cleft_Hyper_Anim09)
635 Else
636 SetConst(LVar0, PRT_MAIN)
637 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
639 Wait(10)
640 SetConst(LVar0, PRT_MAIN)
641 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
643 EndIf
644 Return
646 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
647 IfEq(LVar0, AVAL_State_Normal)
648 SetConst(LVar0, PRT_MAIN)
649 SetConst(LVar1, ANIM_Cleft_Hyper_Anim02)
651 EndIf
653 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
654 IfEq(LVar0, AVAL_State_Toppled)
655 SetConst(LVar0, PRT_MAIN)
656 SetConst(LVar1, ANIM_Cleft_Hyper_Anim03)
658 Else
659 SetConst(LVar0, PRT_MAIN)
660 SetConst(LVar1, ANIM_Cleft_Hyper_Anim07)
661 SetConst(LVar2, ANIM_Cleft_Hyper_Anim08)
663 Return
664 EndIf
666 SetConst(LVar0, PRT_MAIN)
667 SetConst(LVar1, ANIM_Cleft_Hyper_Anim0F)
670 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
671 IfEq(LVar0, AVAL_State_Toppled)
672 SetConst(LVar0, PRT_MAIN)
673 SetConst(LVar1, ANIM_Cleft_Hyper_Anim0F)
674 Else
675 SetConst(LVar0, PRT_MAIN)
676 SetConst(LVar1, ANIM_Cleft_Hyper_Anim08)
677 EndIf
679 Return
682 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
683 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
684 Return
685 End
686};
687
688EvtScript N(EVS_TryGettingUp) = {
689 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
690 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
691 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
692 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0))
693 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03)
694 Wait(20)
695 Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0))
696 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim05)
697 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
698 Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0)
699 IfGt(LVar0, 0)
700 Sub(LVar0, 1)
701 Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0)
702 Else
703 Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0)
704 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03)
705 Thread
706 Wait(3)
707 Loop(5)
708 Add(LVar0, 36)
709 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
710 Wait(1)
711 EndLoop
713 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
714 Sub(LVar1, 6)
715 Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3))
716 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
717 Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
718 Call(N(StartRumbleWithParams), 200, 10)
719 Thread
720 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
722 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
723 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
724 Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2)
725 Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal)
726 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
727 Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims)))
728 Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable)))
729 Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22)
730 Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10)
731 Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE)
732 Wait(1)
733 Call(N(SetSpinSmashable), TRUE)
734 Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE)
735 EndIf
736 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
737 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
738 Return
739 End
740};
741
742EvtScript N(EVS_Attack_Tackle) = {
743 Call(UseIdleAnimation, ACTOR_SELF, FALSE)
744 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
745 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
746 Call(SetGoalToTarget, ACTOR_SELF)
747 Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
748 Call(BattleCamTargetActor, ACTOR_SELF)
749 Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
750 Call(MoveBattleCamOver, 30)
751 Thread
752 Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
753 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
754 Wait(10)
755 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
756 Wait(5)
757 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0)
759 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim10)
760 Wait(10)
761 Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER)
762 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11)
763 Call(SetGoalToTarget, ACTOR_SELF)
764 Call(AddGoalPos, ACTOR_SELF, 50, 0, -5)
765 Call(SetActorSpeed, ACTOR_SELF, Float(4.0))
766 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
767 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim00)
768 Wait(8)
769 Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLEFT_TACKLE)
771 Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS)
775 Set(LVarA, LVar0)
777 Thread
778 Wait(10)
779 Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0)
781 EndIf
782 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11)
783 Call(SetGoalToTarget, ACTOR_SELF)
784 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
785 Sub(LVar0, 100)
786 Set(LVar1, 0)
787 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
788 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
789 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
790 Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 45)
791 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim08)
792 Wait(15)
793 Wait(8)
794 Call(ResetAllActorSounds, ACTOR_SELF)
795 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
796 Call(YieldTurn)
797 Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0)
798 Call(SetActorYaw, ACTOR_SELF, 180)
799 Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT)
800 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07)
801 Call(SetGoalToHome, ACTOR_SELF)
802 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
803 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
804 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
805 Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0)
806 Call(SetActorYaw, ACTOR_SELF, 0)
807 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
808 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
809 Return
812 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11)
813 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
814 Add(LVar0, 20)
815 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
816 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
817 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
818 Call(ResetAllActorSounds, ACTOR_SELF)
819 Wait(2)
820 Call(SetGoalToTarget, ACTOR_SELF)
821 Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS)
822 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
823 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
827 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
828 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
829 Add(LVar0, 15)
830 Set(LVar1, 0)
831 Call(SetActorJumpGravity, ACTOR_SELF, Float(2.4))
832 Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
833 Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE)
834 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
835 Wait(5)
836 Call(YieldTurn)
837 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07)
838 Call(SetActorSpeed, ACTOR_SELF, Float(8.0))
839 Call(SetGoalToHome, ACTOR_SELF)
840 Call(RunToGoal, ACTOR_SELF, 0, FALSE)
841 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02)
844 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
845 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
846 Return
847 End
848};
849
850EvtScript N(EVS_TakeTurn_Unused) = {
851 Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0)
852 IfEq(LVar0, AVAL_State_Toppled)
853 ExecWait(N(EVS_TryGettingUp))
854 Else
855 ExecWait(N(EVS_Attack_Tackle))
856 EndIf
857 Return
858 End
859};
Bytecode EvtScript[]
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4900
@ ACTOR_SOUND_WALK
Definition enums.h:2034
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ ELEMENT_FIRE
Definition enums.h:2116
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ ACTOR_EVENT_FLAG_ATTACK_CHARGED
Actor has charged an attack that can be removed with Star Beam.
Definition enums.h:3389
@ ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
Blast and fire attacks trigger an explosion.
Definition enums.h:3377
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ PHASE_ENEMY_BEGIN
Definition enums.h:2068
@ PHASE_PLAYER_BEGIN
Definition enums.h:2066
@ PHASE_ENEMY_END
Definition enums.h:2067
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ STATUS_KEY_PARALYZE
Definition enums.h:2201
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_KEY_STATIC
Definition enums.h:2207
@ STATUS_END
Definition enums.h:2196
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_KEY_FEAR
Definition enums.h:2199
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_KEY_SLEEP
Definition enums.h:2202
@ STATUS_KEY_STONE
Definition enums.h:2208
@ STATUS_KEY_STOP
Definition enums.h:2204
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_KEY_DIZZY
Definition enums.h:2200
@ STATUS_KEY_POISON
Definition enums.h:2205
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_KEY_NORMAL
Definition enums.h:2197
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DEFAULT
Definition enums.h:2198
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_LUCKY
Definition enums.h:1955
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_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
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6407
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ SOUND_POWER_UP
Definition enums.h:1050
@ SOUND_HYPER_CLEFT_CHARGE
Definition enums.h:1052
@ SOUND_NONE
Definition enums.h:547
@ SOUND_CLEFT_TACKLE
Definition enums.h:1495
@ SOUND_HYPER_CLEFT_LAND
Definition enums.h:1051
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLIPPED
Actor has been flipped over.
Definition enums.h:3330
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4905
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_STAR_BEAM
Definition enums.h:2140
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_SPIKE_TAUNT
Definition enums.h:2148
@ EVENT_AIR_LIFT_FAILED
Definition enums.h:2152
@ EVENT_BEGIN_AIR_LIFT
Definition enums.h:2175
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ EVENT_BLOW_AWAY
Definition enums.h:2143
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_BLAST
Definition enums.h:2860
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
EvtScript EVS_Enemy_ReturnHome
EvtScript EVS_Enemy_Knockback
EvtScript EVS_Enemy_ScareAway
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_AirLift
EvtScript EVS_Enemy_BlowAway
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define 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 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 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 CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define CaseFlag(RVAR)
Marks the start of a switch case that executes only if the RVAR flag is set on LVAR,...
Definition macros.h:349
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define 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 PlayEffect(args...)
Definition macros.h:807
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217
@ BTL_VAL_HyperSync_Active
Definition battle.h:86
@ BTL_VAL_HyperSync_Done
Definition battle.h:85
@ BTL_VAL_HyperSync_None
Definition battle.h:84
@ BTL_VAR_HyperSync
Definition battle.h:83