Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
kooper.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "battle/battle.h"
4#include "script_api/battle.h"
5#include "sprite/npc/BattleKooper.h"
9
10#define NAMESPACE battle_partner_kooper
11
12extern EvtScript N(EVS_Init);
13extern EvtScript N(EVS_TakeTurn);
14extern EvtScript N(EVS_Idle);
15extern EvtScript N(EVS_HandleEvent);
16extern EvtScript N(EVS_HandlePhase);
17extern EvtScript N(firstStrike);
18extern EvtScript N(EVS_ExecuteAction);
19extern EvtScript N(EVS_Celebrate);
20extern EvtScript N(runAway);
21extern EvtScript N(runAwayFail);
22extern EvtScript N(shellToss);
23extern EvtScript N(powerShell);
24extern EvtScript N(dizzyShell);
25extern EvtScript N(fireShell);
26extern EvtScript N(shellTossOnFirstStrike);
27
28enum N(ActorPartIDs) {
29 PRT_MAIN = 1,
30 PRT_ZERO = 0,
31};
32
33enum N(ActorVars) {
34 AVAR_Unk_0 = 0,
35 AVAR_Unk_1 = 1,
36};
37
38enum N(ActorParams) {
39 DMG_UNK = 0,
40};
41
42API_CALLABLE(N(SlowDown)) {
43 BattleStatus* battleStatus = &gBattleStatus;
44 Actor* partnerActor = battleStatus->partnerActor;
45 ActorState* partnerActorMovement = &partnerActor->state;
46
47 if (isInitialCall) {
48 partnerActor->state.curPos.x = partnerActor->curPos.x;
49 partnerActor->state.curPos.y = partnerActor->curPos.y;
50 partnerActor->state.curPos.z = partnerActor->curPos.z;
51 }
52
53 add_xz_vec3f(&partnerActorMovement->curPos, partnerActor->state.speed, partnerActor->state.angle);
54
55 if (partnerActor->state.speed < 4.0f) {
56 play_movement_dust_effects(0, partnerActor->state.curPos.x, partnerActor->state.curPos.y,
57 partnerActor->state.curPos.z, partnerActor->state.angle);
58 } else {
59 play_movement_dust_effects(1, partnerActor->state.curPos.x, partnerActor->state.curPos.y,
60 partnerActor->state.curPos.z, partnerActor->state.angle);
61 }
62
63 partnerActorMovement->speed = partnerActorMovement->speed / 1.5;
64
65 partnerActor->curPos.x = partnerActorMovement->curPos.x;
66 partnerActor->curPos.y = partnerActorMovement->curPos.y;
67 partnerActor->curPos.z = partnerActorMovement->curPos.z;
68
69 if (partnerActorMovement->speed < 1.0) {
70 return ApiStatus_DONE2;
71 }
72
73 return ApiStatus_BLOCK;
74}
75
76API_CALLABLE(N(SetTargetsYaw)) {
77 SelectableTarget* target;
79 Actor* targetActor;
80 ActorPart* targetActorPart;
81 f32 x;
82 f32 targetX;
83 s32 i;
84
85 if (isInitialCall) {
86 script->functionTemp[0] = 0;
87 actor->selectedTargetIndex = 0;
88 }
89
90 if (script->functionTemp[0] == 0) {
91 for (i = 0; i < actor->targetListLength; i++) {
92 x = actor->curPos.x;
93 target = &actor->targetData[actor->targetIndexList[i]];
94 targetX = target->truePos.x;
95 targetActor = get_actor(target->actorID);
96
97 if (targetActor != NULL) {
98 targetActorPart = get_actor_part(targetActor, target->partID);
99
100 if (targetActor->transparentStatus == 0) {
101 if (!(targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) {
102 if (x > targetX) {
103 targetActor->yaw += 33;
104 } else {
105 targetActor->yaw = 0;
106 }
107
108 targetActor->yaw = clamp_angle(targetActor->yaw);
109 }
110 }
111 }
112 }
113
114 if (actor->state.varTable[0] != 0) {
115 for (i = 0; i < actor->targetListLength; i++) {
116 target = &actor->targetData[actor->targetIndexList[i]];
117 targetActor = get_actor(target->actorID);
118 if (targetActor) {
119 targetActor->yaw = 0.0f;
120 }
121 }
122 return ApiStatus_DONE2;
123 }
124 }
125 return ApiStatus_BLOCK;
126}
127
128API_CALLABLE(N(AverageTargetDizzyChance)) {
129 BattleStatus* battleStatus = &gBattleStatus;
130 Actor* partnerActor = battleStatus->partnerActor;
131 Actor* targetActor;
132 ActorPart* targetActorPart;
133 s32 targetActorBlueprintBaseStatusChance;
134 s32 chanceTotal = 0;
135 s32 nTargets = 0;
136 s32 i;
137
138 for (i = 0; i < partnerActor->targetListLength; i++) {
139 targetActor = get_actor(partnerActor->targetData[i].actorID);
140 targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID);
141 targetActorBlueprintBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_KEY_DIZZY);
142
143 if (targetActor->transparentStatus == STATUS_KEY_TRANSPARENT) {
144 targetActorBlueprintBaseStatusChance = 0;
145 }
146
147 if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
148 targetActorBlueprintBaseStatusChance = 0;
149 }
150
151 if (targetActorBlueprintBaseStatusChance > 0) {
152 chanceTotal += targetActorBlueprintBaseStatusChance;
153 nTargets++;
154 }
155 }
156
157 if (nTargets > 0) {
158 script->varTable[0] = chanceTotal / nTargets;
159 } else {
160 script->varTable[0] = 0;
161 }
162
163 return ApiStatus_DONE2;
164}
165
166API_CALLABLE(N(GetFireShellSpeedAndDamage)) {
167 s32 mashResult = script->varTable[0];
168 s32 damage;
169 s32 speedRating;
170
171 if (mashResult <= 35) {
172 damage = 1;
173 speedRating = 0;
174 } else if (mashResult <= 60) {
175 damage = 3;
176 speedRating = 1;
177 } else if (mashResult <= 80) {
178 damage = 4;
179 speedRating = 2;
180 } else if (mashResult < 100) {
181 damage = 5;
182 speedRating = 3;
183 } else {
184 damage = 6;
185 speedRating = 4;
186 }
187
188 script->varTable[14] = speedRating;
189 script->varTable[15] = damage;
190
191 return ApiStatus_DONE2;
192}
193
194s32 N(DefaultAnims)[] = {
195 STATUS_KEY_NORMAL, ANIM_BattleKooper_Walk,
196 STATUS_KEY_STONE, ANIM_BattleKooper_Still,
197 STATUS_KEY_SLEEP, ANIM_BattleKooper_Pray,
198 STATUS_KEY_POISON, ANIM_BattleKooper_Still,
199 STATUS_KEY_STOP, ANIM_BattleKooper_Still,
200 STATUS_KEY_DAZE, ANIM_BattleKooper_Injured,
201 STATUS_KEY_INACTIVE, ANIM_BattleKooper_Still,
203};
204
205s32 N(DefenseTable)[] = {
208};
209
210s32 N(StatusTable)[] = {
213 STATUS_KEY_SLEEP, 100,
216 STATUS_KEY_DIZZY, 100,
217 STATUS_KEY_FEAR, 100,
221 STATUS_KEY_STOP, 100,
233};
234
235ActorPartBlueprint N(ActorParts)[] = {
236 {
237 .flags = 0,
238 .index = PRT_MAIN,
239 .posOffset = { 0, 0, 0 },
240 .targetOffset = { 8, 27 },
241 .opacity = 255,
242 .idleAnimations = N(DefaultAnims),
243 .defenseTable = N(DefenseTable),
244 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
245 .elementImmunityFlags = 0,
246 .projectileTargetOffset = { 0, 0 },
247 },
248};
249
250ActorBlueprint NAMESPACE = {
251 .flags = 0,
252 .type = ACTOR_TYPE_KOOPER,
253 .level = ACTOR_LEVEL_KOOPER,
254 .maxHP = 99,
255 .partCount = ARRAY_COUNT(N(ActorParts)),
256 .partsData = N(ActorParts),
257 .initScript = &N(EVS_Init),
258 .statusTable = N(StatusTable),
259 .escapeChance = 0,
260 .airLiftChance = 0,
261 .hurricaneChance = 0,
262 .spookChance = 0,
263 .upAndAwayChance = 0,
264 .spinSmashReq = 4,
265 .powerBounceChance = 80,
266 .coinReward = 0,
267 .size = { 32, 38 },
268 .healthBarOffset = { 0, 0 },
269 .statusIconOffset = { -10, 30 },
270 .statusTextOffset = { 10, 30 },
271};
272
273EvtScript N(EVS_Init) = {
274 Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn)))
275 Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle)))
276 Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent)))
277 Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase)))
278 Return
279 End
280};
281
282EvtScript N(EVS_Idle) = {
283 Return
284 End
285};
286
287EvtScript N(EVS_HandleEvent) = {
288 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
289 Call(CloseActionCommandInfo)
290 Call(GetLastEvent, ACTOR_PARTNER, LVar0)
294 SetConst(LVar1, ANIM_BattleKooper_Hurt)
295 SetConst(LVar2, ANIM_BattleKooper_Hurt)
297 SetConst(LVar1, ANIM_BattleKooper_Hurt)
302 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
303 SetConst(LVar0, PRT_MAIN)
304 SetConst(LVar1, ANIM_BattleKooper_Hurt)
308 SetConst(LVar1, ANIM_BattleKooper_Hurt)
309 Set(LVar2, 16)
311 SetConst(LVar1, ANIM_BattleKooper_Hurt)
314 SetConst(LVar1, ANIM_BattleKooper_BurnHurt)
315 Set(LVar2, 16)
316 SetConst(LVar3, ANIM_BattleKooper_BurnStill)
318 SetConst(LVar1, ANIM_BattleKooper_Hurt)
321 SetConst(LVar1, ANIM_BattleKooper_BurnHurt)
322 SetConst(LVar2, ANIM_BattleKooper_BurnStill)
324 SetConst(LVar1, ANIM_BattleKooper_Hurt)
327 SetConst(LVar0, PRT_MAIN)
328 SetConst(LVar1, ANIM_BattleKooper_Hurt)
329 Set(LVar2, 16)
332 SetConst(LVar1, ANIM_BattleKooper_Hurt)
335 SetConst(LVar0, PRT_MAIN)
336 SetConst(LVar1, ANIM_BattleKooper_Idle)
337 SetConst(LVar2, ANIM_BattleKooper_Run)
338 Set(LVar3, 0)
342 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
343 SetConst(LVar0, PRT_MAIN)
344 SetConst(LVar1, ANIM_BattleKooper_LowerShell)
346 Wait(10)
347 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
351 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
352 Return
353 End
354};
355
356EvtScript N(EVS_TakeTurn) = {
357 Call(GetBattlePhase, LVar0)
360 ExecWait(N(firstStrike))
362 ExecWait(N(EVS_ExecuteAction))
364 ExecWait(N(EVS_Celebrate))
366 ExecWait(N(runAway))
368 ExecWait(N(runAwayFail))
370 Return
371 End
372};
373
374EvtScript N(EVS_Celebrate) = {
375 SetConst(LVar0, PRT_MAIN)
376 SetConst(LVar1, ANIM_BattleKooper_Celebrate)
377 SetConst(LVar2, ANIM_BattleKooper_Walk)
378 SetConst(LVar3, ANIM_BattleKooper_Idle)
380 Return
381 End
382};
383
384EvtScript N(runAway) = {
385 SetConst(LVar0, PRT_MAIN)
386 SetConst(LVar1, ANIM_BattleKooper_Run)
388 Return
389 End
390};
391
392EvtScript N(runAwayFail) = {
393 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
394 Call(SetGoalToHome, ACTOR_PARTNER)
395 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
396 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
397 Call(SetActorYaw, ACTOR_PARTNER, 0)
398 Call(RunToGoal, ACTOR_PARTNER, 0)
399 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
400 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
401 Return
402 End
403};
404
405EvtScript N(EVS_HandlePhase) = {
406 Return
407 End
408};
409
410EvtScript N(EVS_ExecuteAction) = {
411 Call(ShowActionHud, TRUE)
412 Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
413 Call(GetMenuSelection, LVar0, LVar1, LVar2)
416 Call(LoadStarPowerScript)
418 Return
420 Call(GetMenuSelection, LVar0, LVar1, LVar2)
422 CaseEq(MOVE_SHELL_TOSS1)
423 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
424 Set(LVarF, 2)
425 Set(LVarE, 1)
426 ExecWait(N(shellToss))
427 CaseEq(MOVE_SHELL_TOSS2)
428 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
429 Set(LVarF, 3)
430 Set(LVarE, 2)
431 ExecWait(N(shellToss))
432 CaseEq(MOVE_SHELL_TOSS3)
433 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
434 Set(LVarF, 5)
435 Set(LVarE, 3)
436 ExecWait(N(shellToss))
437 CaseEq(MOVE_POWER_SHELL)
438 Call(SetDamageSource, DMG_SRC_POWER_SHELL)
439 ExecWait(N(powerShell))
440 CaseEq(MOVE_DIZZY_SHELL)
441 Call(SetDamageSource, DMG_SRC_DIZZY_SHELL)
442 ExecWait(N(dizzyShell))
443 CaseEq(MOVE_FIRE_SHELL)
444 Call(SetDamageSource, DMG_SRC_FIRE_SHELL)
445 ExecWait(N(fireShell))
447 Return
448 End
449};
450
451EvtScript N(firstStrike) = {
452 Call(GetMenuSelection, LVar0, LVar1, LVar2)
454 CaseEq(MOVE_SHELL_TOSS1)
455 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
456 ExecWait(N(shellTossOnFirstStrike))
457 CaseEq(MOVE_SHELL_TOSS2)
458 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
459 ExecWait(N(shellTossOnFirstStrike))
460 CaseEq(MOVE_SHELL_TOSS3)
461 Call(SetDamageSource, DMG_SRC_SHELL_TOSS)
462 ExecWait(N(shellTossOnFirstStrike))
464 Return
465 End
466};
467
468EvtScript N(EVS_ReturnHome_Miss) = {
469 Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK)
470 Thread
471 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
472 Wait(30)
473 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
475 Call(PartnerYieldTurn)
476 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
477 Sub(LVar0, 60)
478 Set(LVar1, 0)
479 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
480 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
481 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
482 Sub(LVar0, 30)
483 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
484 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE)
485 Sub(LVar0, 20)
486 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
487 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE)
488 Sub(LVar0, 10)
489 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE)
490 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
491 Wait(4)
492 Call(SetGoalToHome, ACTOR_PARTNER)
493 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
494 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
495 Call(RunToGoal, ACTOR_PARTNER, 0)
496 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
497 Return
498 End
499};
500
501EvtScript N(EVS_ReturnHome_Success) = {
502 Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK)
503 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
504 Call(PartnerYieldTurn)
505 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
506 Sub(LVar0, 30)
507 Set(LVar1, 0)
508 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.1))
509 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
510 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
511 Sub(LVar0, 20)
512 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
513 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE)
514 Sub(LVar0, 10)
515 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
516 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE)
517 Sub(LVar0, 10)
518 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE)
519 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
520 Wait(4)
521 Call(SetGoalToHome, ACTOR_PARTNER)
522 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
523 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
524 Call(RunToGoal, ACTOR_PARTNER, 0)
525 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
526 Return
527 End
528};
529
530EvtScript N(getShellTossMoveTime) = {
531 Call(SetGoalToTarget, ACTOR_PARTNER)
532 Call(GetGoalPos, ACTOR_PARTNER, LVarB, LVarC, LVarD)
533 Call(GetActorPos, ACTOR_PARTNER, LVarC, LVarD, LVar0)
535 Sub(LVarB, LVarC)
536 Else
537 Sub(LVarC, LVarB)
538 Set(LVarB, LVarC)
539 EndIf
541 IfLt(LVarB, 0)
542 Set(LVarB, 0)
543 EndIf
544 Return
545 End
546};
547
548EvtScript N(shellToss) = {
549 Call(LoadActionCommand, ACTION_COMMAND_SMASH)
550 Call(action_command_hammer_init)
551 Call(InitTargetIterator)
552 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
553 Add(LVar0, 30)
554 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
555 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
556 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
557 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
558 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
559 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell)
560 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
561 Wait(15)
562 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
563 Loop(30)
564 Wait(1)
565 Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0)
566 IfNe(LVar0, FALSE)
568 EndIf
569 EndLoop
570 Call(action_command_hammer_start, 0, 50 * DT - 3, 3)
571 Call(SetActionQuality, 0)
572 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
574 Call(UseBattleCamPreset, BTL_CAM_PARTNER_CLOSE_UP)
575 Set(LVar9, 0)
576 Set(LVar1, 0)
577 Loop(50 * DT)
578 Wait(1)
580 CaseLt(20 * DT)
581 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
582 CaseEq(20 * DT)
583 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
584 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
585 CaseLt(30 * DT)
586 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
587 CaseEq(30 * DT)
588 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
589 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
590 CaseLt(40 * DT)
591 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
592 CaseEq(40 * DT)
593 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
594 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
595 CaseLt(50 * DT)
596 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
597 CaseEq(50 * DT)
598 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
599 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
601 Add(LVar9, 1)
602 Call(GetActionQuality, LVar0)
603 IfNe(LVar0, 0)
604 IfNe(LVar1, TRUE)
605 Set(LVar1, 1)
606 EndIf
607 EndIf
608 Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0)
609 IfEq(LVar0, FALSE)
611 EndIf
612 EndLoop
613 Label(0)
614 Wait(1)
615 SetF(LVarA, Float(8.0))
617 CaseLt(20 * DT)
618 SetF(LVarA, Float(10.0))
619 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
620 CaseLt(30 * DT)
621 SetF(LVarA, Float(12.0))
622 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
623 CaseLt(40 * DT)
624 SetF(LVarA, Float(14.0))
625 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
626 CaseLt(50 * DT)
627 SetF(LVarA, Float(16.0))
628 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
630 Add(LVar9, 1)
631 Call(GetActionSuccess, LVar0)
632 IfEq(LVar0, 0)
633 Goto(0)
634 EndIf
636 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
637 Call(MoveBattleCamOver, 15)
638 ExecWait(N(getShellTossMoveTime))
639 Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL)
640 Call(SetGoalToTarget, ACTOR_PARTNER)
641 Call(SetActorSpeed, ACTOR_PARTNER, LVarA)
643 Call(RunToGoal, ACTOR_PARTNER, 0)
646 Thread
647 Call(N(SlowDown))
648 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0)
650 Wait(4)
651 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill)
652 Call(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0)
653 Set(LVar0, 0)
654 Loop(2)
655 Add(LVar0, -30)
656 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
657 Wait(1)
658 EndLoop
659 Wait(5)
660 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
661 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0)
662 Loop(5)
663 Add(LVar0, 12)
664 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
665 Wait(1)
666 EndLoop
667 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
668 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 2)
669 Wait(2)
670 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, -2)
671 Wait(2)
672 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0)
673 Wait(10)
674 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
675 Wait(10)
676 Call(SetGoalToHome, ACTOR_PARTNER)
677 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
678 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
679 Call(RunToGoal, ACTOR_PARTNER, 0)
680 Return
681 EndIf
682 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0)
683 Call(GetPartnerActionSuccess, LVar0)
685 CaseGt(0)
690 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
694 ExecWait(N(EVS_ReturnHome_Success))
698 ExecWait(N(EVS_ReturnHome_Miss))
701 Return
702 End
703};
704
705EvtScript N(powerShell) = {
706 Call(LoadActionCommand, ACTION_COMMAND_SMASH)
707 Call(action_command_hammer_init)
708 Call(GetActorLevel, ACTOR_PARTNER, LVar0)
710 CaseEq(0)
711 Set(LVarE, 1)
712 Set(LVarF, 2)
713 CaseEq(1)
714 Set(LVarE, 1)
715 Set(LVarF, 3)
716 CaseEq(2)
717 Set(LVarE, 1)
718 Set(LVarF, 4)
720 Call(InitTargetIterator)
721 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
722 Add(LVar0, 30)
723 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
724 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
725 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
726 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
727 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
728 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell)
729 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
730 Wait(15)
731 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
732 Loop(30)
733 Wait(1)
734 Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0)
735 IfNe(LVar0, FALSE)
737 EndIf
738 EndLoop
739 Call(UseBattleCamPreset, BTL_CAM_PARTNER_CLOSE_UP)
740 Call(action_command_hammer_start, 0, 47, 3)
741 Call(SetActionQuality, 0)
742 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
744 Set(LVar9, 0)
745 Set(LVar1, 0)
746 Loop(50)
747 Wait(1)
749 CaseLt(20)
750 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
751 CaseEq(20)
752 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
753 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
754 CaseLt(30)
755 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
756 CaseEq(30)
757 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
758 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
759 CaseLt(40)
760 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
761 CaseEq(40)
762 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
763 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
764 CaseLt(50)
765 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
766 CaseEq(50)
767 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
768 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
770 Add(LVar9, 1)
771 Call(GetActionQuality, LVar0)
772 IfNe(LVar0, 0)
773 IfNe(LVar1, TRUE)
774 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
775 Set(LVar1, 1)
776 EndIf
777 EndIf
778 Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0)
779 IfEq(LVar0, FALSE)
781 EndIf
782 EndLoop
783 Label(0)
784 Wait(1)
785 Set(LVarA, Float(8.0))
787 CaseLt(20)
788 Set(LVarA, Float(10.0))
789 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
790 CaseLt(30)
791 Set(LVarA, Float(12.0))
792 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
793 CaseLt(40)
794 Set(LVarA, Float(14.0))
795 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
796 CaseLt(50)
797 Set(LVarA, Float(16.0))
798 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
800 Add(LVar9, 1)
801 Call(GetActionSuccess, LVar0)
802 IfEq(LVar0, 0)
803 Goto(0)
804 EndIf
805 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
807 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
808 Call(MoveBattleCamOver, 15)
809 Set(LVarB, 260)
811 Thread
812 Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_GREY_SMOKE_TRAIL)
813 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
814 Add(LVar0, 260)
815 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
816 Call(SetActorSpeed, ACTOR_PARTNER, LVarA)
818 Call(RunToGoal, ACTOR_PARTNER, 0)
819 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
820 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1)
822 Set(LFlag0, FALSE)
823 Label(10)
824 Wait(1)
825 Call(SetGoalToTarget, ACTOR_PARTNER)
826 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
827 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
829 Goto(10)
830 EndIf
832 IfEq(LVar0, 6)
833 Goto(12)
834 EndIf
835 IfEq(LFlag0, FALSE)
836 Call(GetPartnerActionSuccess, LVar0)
838 CaseGt(0)
839 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
841 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
843 EndIf
844 Set(LFlag0, TRUE)
845 Call(GetPartnerActionSuccess, LVar0)
847 CaseGt(0)
852 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
853 Label(12)
854 Call(ChooseNextTarget, ITER_NEXT, LVar2)
856 Goto(10)
857 EndIf
858 IfEq(LFlag0, FALSE)
859 Call(GetPartnerActionSuccess, LVar0)
861 CaseGt(0)
862 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
864 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
866 EndIf
867 Label(11)
868 Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
869 IfEq(LVar0, 0)
870 Wait(1)
871 Goto(11)
872 EndIf
873 Call(GetPartnerActionSuccess, LVar0)
875 CaseGt(0)
876 ExecWait(N(EVS_ReturnHome_Success))
878 ExecWait(N(EVS_ReturnHome_Miss))
880 Return
881 End
882};
883
884EvtScript N(dizzyShell) = {
885 Call(LoadActionCommand, ACTION_COMMAND_DIZZY_SHELL)
886 Call(action_command_dizzy_shell_init)
887 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
888 Call(InitTargetIterator)
889 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
890 Add(LVar0, 30)
891 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
892 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
893 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
894 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
895 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
896 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell)
897 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
898 Wait(15)
899 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
900 Call(UseBattleCamPreset, BTL_CAM_PARTNER_CLOSE_UP)
901 Call(MoveBattleCamOver, 75 * DT)
902 Set(LVarD, 75 * DT)
903 Set(LVarA, LVarD)
904 Add(LVarA, -3)
905 Call(battle_partner_kooper_AverageTargetDizzyChance)
906 Call(action_command_dizzy_shell_start, 0, LVarA, 3, LVar0)
907 Call(SetActionQuality, 0)
908 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
910 Set(LVar9, 0)
911 Set(LVarA, Float(8.0))
912 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_DIZZY_SHELL)
913 Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_WHIRLWIND)
914 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
915 Set(LVar9, 1)
916 Loop(LVarD)
917 Wait(1)
918 Call(GetActionQuality, LVar0)
920 CaseLt(20 * DT)
921 Set(LVarA, Float(10.0))
922 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
923 CaseLt(40 * DT)
924 Set(LVarA, Float(12.0))
925 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
926 CaseLt(60 * DT)
927 Set(LVarA, Float(14.0))
928 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
930 Set(LVarA, Float(16.0))
931 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
934 CaseEq(10 * DT)
935 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
936 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
937 CaseEq(20 * DT)
938 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
939 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
940 CaseEq(40 * DT)
941 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
942 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
943 CaseEq(60 * DT)
944 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
945 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0)
947 EndLoop
949 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
950 Call(MoveBattleCamOver, 15)
951 Set(LVarB, 300)
953 Thread
954 Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL)
955 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE)
956 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
957 Add(LVar0, 350)
958 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
959 Call(SetActorSpeed, ACTOR_PARTNER, LVarA)
961 Call(RunToGoal, ACTOR_PARTNER, 0)
962 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0)
963 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1)
964 Wait(20)
965 Call(SetActorPos, ACTOR_PARTNER, -200, 0, 0)
966 Call(SetGoalToHome, ACTOR_PARTNER)
967 Call(AddGoalPos, ACTOR_PARTNER, 40, 0, 0)
968 Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0))
969 Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT)
970 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE)
971 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
973 Thread
974 Call(N(SetTargetsYaw))
976 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
977 Set(LFlag0, FALSE)
978 Label(10)
979 Wait(1)
980 Call(SetGoalToTarget, ACTOR_PARTNER)
981 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
982 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
984 Goto(10)
985 EndIf
988 Goto(12)
989 EndIf
990 IfEq(LFlag0, FALSE)
991 Call(GetPartnerActionSuccess, LVar0)
993 CaseGt(99)
994 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
996 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
998 EndIf
999 Set(LFlag0, TRUE)
1000 Call(GetActionQuality, LVarF)
1001 Call(GetPartnerActionSuccess, LVar0)
1002 Switch(LVar0)
1003 CaseGt(0)
1004 IfEq(LVar9, 1)
1005 IfEq(LVarF, 100)
1008 Else
1010 EndIf
1011 Else
1013 EndIf
1015 IfEq(LVar9, 1)
1017 Else
1019 EndIf
1020 EndSwitch
1021 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1022 Label(12)
1023 Call(ChooseNextTarget, ITER_NEXT, LVar2)
1025 Goto(10)
1026 EndIf
1027 IfEq(LFlag0, FALSE)
1028 Call(GetPartnerActionSuccess, LVar0)
1029 Switch(LVar0)
1030 CaseGt(99)
1031 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
1033 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
1034 EndSwitch
1035 EndIf
1036 Label(11)
1037 Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
1038 IfEq(LVar0, 0)
1039 Wait(1)
1040 Goto(11)
1041 EndIf
1042 Wait(15)
1043 Call(PartnerYieldTurn)
1044 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
1045 Wait(15)
1046 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1047 Call(SetGoalToHome, ACTOR_PARTNER)
1048 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
1049 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
1050 Call(RunToGoal, ACTOR_PARTNER, 0)
1051 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1052 Return
1053 End
1054};
1055
1056EvtScript N(fireShell) = {
1057 Call(LoadActionCommand, ACTION_COMMAND_FIRE_SHELL)
1058 Call(action_command_fire_shell_init)
1059 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1060 Call(InitTargetIterator)
1061 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
1062 Add(LVar0, 30)
1063 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
1064 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
1065 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1066 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
1067 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1068 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell)
1069 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1070 Wait(15)
1071 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
1072 Call(UseBattleCamPreset, BTL_CAM_PARTNER_CLOSE_UP)
1073 Call(MoveBattleCamOver, 75 * DT)
1074 Set(LVarD, 75 * DT)
1075 Set(LVarC, LVarD)
1076 Add(LVarC, -3)
1077 Call(action_command_fire_shell_start, 0, LVarC, 3)
1078 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0)
1079 Set(LVarA, Float(8.0))
1080 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
1081 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP)
1082 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_ROARING_FIRE)
1083 Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_RED_FLAMES)
1084 Wait(1)
1085 Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, 10, 10, 255, 0)
1086 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1)
1088 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, SPR_PAL_BattleKooper, SPR_PAL_BattleKooper, 1, 10, 1000, 10, 0, 0)
1089 Call(EnableActorPaletteEffects, ACTOR_PARTNER, 0, TRUE)
1090 Set(LVar6, SPR_PAL_BattleKooper)
1091 Set(LVar7, SPR_PAL_BattleKooper)
1092 Set(LVar8, 30)
1093 Set(LVar9, 30)
1094 Loop(LVarD)
1095 Wait(1)
1096 Call(GetActionQuality, LVar0)
1097 Switch(LVar0)
1098 CaseGe(80 * DT)
1099 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest)
1100 Set(LVar9, 80 * DT)
1101 Set(LVar7, SPR_PAL_BattleKooper_Red4)
1102 IfNe(LVar6, LVar7)
1104 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0)
1105 Set(LVar6, LVar7)
1106 EndIf
1107 CaseGe(60 * DT)
1108 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster)
1109 Set(LVar9, 60 * DT)
1110 Set(LVar7, SPR_PAL_BattleKooper_Red3)
1111 IfNe(LVar6, LVar7)
1113 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0)
1114 Set(LVar6, LVar7)
1115 EndIf
1116 CaseGe(40 * DT)
1117 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower)
1118 Set(LVar9, 40 * DT)
1119 Set(LVar7, SPR_PAL_BattleKooper_Red2)
1120 IfNe(LVar6, LVar7)
1122 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0)
1123 Set(LVar6, LVar7)
1124 EndIf
1125 CaseGe(20 * DT)
1126 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
1127 Set(LVar9, 35 * DT)
1128 Set(LVar7, SPR_PAL_BattleKooper_Red1)
1129 IfNe(LVar6, LVar7)
1131 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0)
1132 Set(LVar6, LVar7)
1133 EndIf
1135 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
1136 Set(LVar9, 30 * DT)
1137 Set(LVar7, SPR_PAL_BattleKooper)
1138 IfNe(LVar6, LVar7)
1140 Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0)
1141 Set(LVar6, LVar7)
1142 EndIf
1143 EndSwitch
1144 IfLt(LVar8, LVar9)
1145 Add(LVar8, 1)
1146 EndIf
1147 IfGt(LVar8, LVar9)
1148 Sub(LVar8, 1)
1149 EndIf
1150 Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, LVar8, LVar8, 255, 0)
1151 Switch(LVarD)
1152 CaseEq(10 * DT)
1153 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
1154 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0)
1155 CaseEq(20 * DT)
1156 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
1157 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0)
1158 CaseEq(40 * DT)
1159 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
1160 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0)
1161 CaseEq(60 * DT)
1162 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
1163 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0)
1164 EndSwitch
1165 EndLoop
1166 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_FIRE_SHELL_LAUNCH)
1167 Call(N(GetFireShellSpeedAndDamage))
1168 Switch(LVarE)
1169 CaseOrEq(0)
1170 CaseOrEq(1)
1171 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1172 Call(MoveBattleCamOver, 50)
1173 SetF(LVarA, Float(10.0))
1175 CaseOrEq(2)
1176 CaseOrEq(3)
1177 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1178 Call(MoveBattleCamOver, 30)
1179 SetF(LVarA, Float(10.0))
1181 CaseEq(4)
1182 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1183 Call(MoveBattleCamOver, 15)
1184 SetF(LVarA, Float(16.0))
1185 EndSwitch
1186 Set(LVarB, 350)
1187 DivF(LVarB, LVarA)
1188 Thread
1189 Call(AddActorDecoration, ACTOR_PARTNER, -1, 1, ACTOR_DECORATION_FIRE_SMOKE_TRAIL)
1190 Wait(1)
1191 Switch(LVarE)
1192 CaseOrEq(0)
1193 CaseOrEq(1)
1194 Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 50, 0, 0, 0)
1196 CaseOrEq(2)
1197 CaseOrEq(3)
1198 Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 100, 0, 0, 0)
1200 CaseEq(4)
1201 Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 300, 0, 0, 0)
1202 EndSwitch
1203 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE)
1204 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1205 Add(LVar0, 350)
1206 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1207 Call(SetActorSpeed, ACTOR_PARTNER, LVarA)
1209 Call(RunToGoal, ACTOR_PARTNER, 0)
1210 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1)
1211 Wait(20)
1212 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0)
1213 Call(EnableActorPaletteEffects, ACTOR_PARTNER, 0, FALSE)
1214 Call(SetActorPos, ACTOR_PARTNER, -200, 0, 0)
1215 Call(SetGoalToHome, ACTOR_PARTNER)
1216 Call(AddGoalPos, ACTOR_PARTNER, 40, 0, 0)
1217 Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0))
1218 Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT)
1219 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE)
1220 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
1221 EndThread
1222 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
1223 Set(LFlag0, FALSE)
1224 Label(10)
1225 Wait(1)
1226 Call(SetGoalToTarget, ACTOR_PARTNER)
1227 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1228 Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
1229 IfGt(LVar0, LVar3)
1230 Goto(10)
1231 EndIf
1233 IfEq(LVar0, 6)
1234 Goto(12)
1235 EndIf
1236 IfEq(LFlag0, FALSE)
1237 Call(GetPartnerActionSuccess, LVar0)
1238 Switch(LVar0)
1239 CaseGt(99)
1240 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
1242 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
1243 EndSwitch
1244 EndIf
1245 Set(LFlag0, TRUE)
1246 Call(GetActionQuality, LVar0)
1247 Call(GetPartnerActionSuccess, LVar0)
1248 Switch(LVar0)
1249 CaseGt(99)
1253 EndSwitch
1254 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1255 Label(12)
1256 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1258 Goto(10)
1259 EndIf
1260 IfEq(LFlag0, FALSE)
1261 Call(GetPartnerActionSuccess, LVar0)
1262 Switch(LVar0)
1263 CaseGt(99)
1264 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
1266 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
1267 EndSwitch
1268 EndIf
1269 Label(11)
1270 Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0)
1271 IfEq(LVar0, 0)
1272 Wait(1)
1273 Goto(11)
1274 EndIf
1275 Wait(15)
1276 Call(PartnerYieldTurn)
1277 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
1278 Wait(15)
1279 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1280 Call(SetGoalToHome, ACTOR_PARTNER)
1281 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
1282 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
1283 Call(RunToGoal, ACTOR_PARTNER, 0)
1284 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1285 Return
1286 End
1287};
1288
1289EvtScript N(shellTossOnFirstStrike) = {
1290 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1291 Add(LVar0, 60)
1292 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1293 Call(InitTargetIterator)
1294 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1295 Call(MoveBattleCamOver, 15)
1296 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
1297 Call(SetGoalToTarget, ACTOR_PARTNER)
1298 Call(SetActorSpeed, ACTOR_PARTNER, Float(16.0))
1300 Call(RunToGoal, ACTOR_PARTNER, 0)
1303 Thread
1304 Call(N(SlowDown))
1305 Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0)
1306 EndThread
1307 Wait(4)
1308 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill)
1309 Call(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0)
1310 Set(LVar0, 0)
1311 Loop(2)
1312 Add(LVar0, -30)
1313 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
1314 Wait(1)
1315 EndLoop
1316 Wait(5)
1317 Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6)
1318 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0)
1319 Loop(5)
1320 Add(LVar0, 12)
1321 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
1322 Wait(1)
1323 EndLoop
1324 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
1325 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 2)
1326 Wait(2)
1327 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, -2)
1328 Wait(2)
1329 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0)
1330 Wait(10)
1331 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
1332 Wait(10)
1333 Call(SetGoalToHome, ACTOR_PARTNER)
1334 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
1335 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
1336 Call(RunToGoal, ACTOR_PARTNER, 0)
1337 Return
1338 EndIf
1339 Set(LVarF, 1)
1340 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1341 Switch(LVar2)
1342 CaseEq(MOVE_SHELL_TOSS1)
1343 Set(LVarF, 1)
1344 CaseEq(MOVE_SHELL_TOSS2)
1345 Set(LVarF, 2)
1346 CaseEq(MOVE_SHELL_TOSS3)
1347 Set(LVarF, 3)
1348 EndSwitch
1350 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1351 Switch(LVar2)
1352 CaseEq(MOVE_SHELL_TOSS1)
1353 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1354 CaseEq(MOVE_SHELL_TOSS2)
1355 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1356 CaseEq(MOVE_SHELL_TOSS3)
1357 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1358 EndSwitch
1359 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1360 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1361 Sub(LVar0, 40)
1362 Set(LVar1, 0)
1363 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.1))
1364 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1365 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
1366 Sub(LVar0, 30)
1367 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1368 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE)
1369 Sub(LVar0, 20)
1370 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1371 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE)
1372 Sub(LVar0, 10)
1373 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE)
1374 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell)
1375 Wait(15)
1376 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1377 Call(SetGoalToHome, ACTOR_PARTNER)
1378 Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0))
1379 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run)
1380 Call(RunToGoal, ACTOR_PARTNER, 0)
1381 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle)
1382 Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE)
1383 Call(UseIdleAnimation, ACTOR_SELF, TRUE)
1384 Return
1385 End
1386};
s8 transparentStatus
s8 selectedTargetIndex
ActorState state
struct SelectableTarget targetData[24]
Vec3f curPos
s8 targetIndexList[24]
Bytecode EvtScript[]
s8 targetListLength
s32 * statusTable
#define clamp_angle
@ ACTION_COMMAND_SMASH
Definition enums.h:3474
@ ACTION_COMMAND_FIRE_SHELL
Definition enums.h:3481
@ ACTION_COMMAND_DIZZY_SHELL
Definition enums.h:3480
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ ACTOR_SOUND_WALK
Definition enums.h:2034
@ 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
@ BS_FLAGS1_4000
Definition enums.h:3583
@ 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_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS
Definition enums.h:2253
@ ACTOR_EVENT_FLAGS_NONE
Definition enums.h:3370
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
Definition enums.h:3374
@ ACTOR_DECORATION_GREY_SMOKE_TRAIL
Definition enums.h:2048
@ ACTOR_DECORATION_RED_FLAMES
Definition enums.h:2047
@ ACTOR_DECORATION_WHIRLWIND
Definition enums.h:2050
@ ACTOR_DECORATION_FIRE_SMOKE_TRAIL
Definition enums.h:2049
@ PHASE_RUN_AWAY_START
Definition enums.h:2060
@ PHASE_EXECUTE_ACTION
Definition enums.h:2058
@ PHASE_CELEBRATE
Definition enums.h:2062
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2064
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ BTL_MENU_TYPE_STAR_POWERS
Definition enums.h:4235
#define SUPPRESS_EVENTS_KOOPER_DAMAGE
Definition enums.h:2923
@ 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_TRANSPARENT
Definition enums.h:2210
@ 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_KEY_INACTIVE
Definition enums.h:2214
@ 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_DAZE
Definition enums.h:2209
@ STATUS_KEY_DEFAULT
Definition enums.h:2198
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1953
@ HIT_RESULT_NICE
Definition enums.h:1951
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_RETURN_HOME
Definition enums.h:4826
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ BTL_CAM_PARTNER_CLOSE_UP
Definition enums.h:4881
@ BTL_CAM_PARTNER_MISTAKE
Definition enums.h:4873
@ EASING_QUARTIC_OUT
Definition enums.h:516
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6408
@ STATUS_FLAG_DIZZY
Definition enums.h:2818
@ DMG_SRC_DIZZY_SHELL
Definition enums.h:1996
@ DMG_SRC_POWER_SHELL
Definition enums.h:1995
@ DMG_SRC_FIRE_SHELL
Definition enums.h:1997
@ DMG_SRC_SHELL_TOSS
Definition enums.h:1994
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ SOUND_NONE
Definition enums.h:547
@ SOUND_PARAKARRY_AIR_RAID_1
Definition enums.h:1319
@ SOUND_DIZZY_SHELL_LAUNCH
Definition enums.h:1007
@ SOUND_ROARING_FIRE
Definition enums.h:1005
@ SOUND_PARAKARRY_AIR_RAID_2
Definition enums.h:1320
@ SOUND_KOOPER_SHELL_SPINUP
Definition enums.h:1321
@ SOUND_FIRE_SHELL_LAUNCH
Definition enums.h:1006
@ SOUND_DIZZY_SHELL
Definition enums.h:1346
#define SUPPRESS_EVENTS_KOOPER_TEST
Definition enums.h:2918
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
@ ACTOR_BLUR_DISABLE
Definition enums.h:6413
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_33
Definition enums.h:2169
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_SPIKE_CONTACT
Definition enums.h:2163
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_BLOCK
Definition enums.h:2147
@ EVENT_18
Definition enums.h:2145
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_RECOVER_FROM_KO
Definition enums.h:2170
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_BURN_CONTACT
Definition enums.h:2164
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ DAMAGE_TYPE_FIRE
Definition enums.h:2852
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_BLOCK
Definition evt.h:116
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
Definition 190B20.c:1139
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:1191
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
s32 lookup_status_chance(s32 *, s32)
Definition 190B20.c:2046
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
Definition 190B20.c:1166
EvtScript EVS_Partner_Hit
EvtScript EVS_Partner_Recover
EvtScript EVS_Partner_BurnContact
EvtScript EVS_Partner_Drop
EvtScript EVS_Partner_NoDamageHit
EvtScript EVS_Partner_ShockHit
EvtScript EVS_Partner_BurnHit
EvtScript EVS_Partner_Celebrate
EvtScript EVS_Partner_SpikeContact
EvtScript EVS_Partner_RunAway
#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 DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#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 LVarF
Definition macros.h:163
#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 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 CaseGe(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:334
#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 DMG_STATUS_ALWAYS(typeFlag, duration)
Definition macros.h:225
#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 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 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 SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define LVar8
Definition macros.h:156
#define LVar2
Definition macros.h:150
#define DT
Definition macros.h:522
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#define LVarD
Definition macros.h:161
#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 CaseLt(RVAR)
Marks the start of a switch case that executes only if LVAR < RVAR. It also marks the end of any prev...
Definition macros.h:325
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define CaseGt(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:328
#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 LVarE
Definition macros.h:162
#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
struct Actor * partnerActor
BattleStatus gBattleStatus
Definition battle.c:11