Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
bombette.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/BattleBombette.h"
8
9#define NAMESPACE battle_partner_bombette
10
11extern EvtScript N(EVS_Init);
12extern EvtScript N(EVS_TakeTurn);
13extern EvtScript N(EVS_Idle);
14extern EvtScript N(EVS_HandleEvent);
15extern EvtScript N(EVS_HandlePhase);
16extern EvtScript N(EVS_Celebrate);
17extern EvtScript N(EVS_ExecuteAction);
18extern EvtScript N(EVS_Attack_FirstStrike);
19extern EvtScript N(EVS_FirstStrike);
20extern EvtScript N(EVS_RunAway);
22extern EvtScript N(EVS_Attack_BodySlam);
23extern EvtScript N(EVS_Attack_Bomb);
24
25enum N(ActorPartIDs) {
26 PRT_MAIN = 1,
27};
28
29enum N(ActorVars) {
30 AVAR_Unk_0 = 0,
31};
32
33enum {
36};
37
38API_CALLABLE(N(PlayExplosionFX)) {
39 BattleStatus* battleStatus = &gBattleStatus;
40 Bytecode* args = script->ptrReadPos;
41 s32 x = evt_get_variable(script, *args++);
42 s32 y = evt_get_variable(script, *args++);
43 s32 z = evt_get_variable(script, *args++);
44 s16 selectedMoveID;
45 s32 soundID;
46
47 fx_smoke_ring(0, x, y, z);
48 selectedMoveID = battleStatus->selectedMoveID;
49
50 switch (selectedMoveID) {
51 case MOVE_BOMB:
52 if (script->varTable[10] > 0) {
53 fx_explosion(1, x, y + 20, z);
54 } else {
55 fx_explosion(0, x, y + 20, z);
56 }
58 break;
59 case MOVE_POWER_BOMB:
60 if (script->varTable[10] > 0) {
61 fx_explosion(1, x, y + 20, z);
62 } else {
63 fx_explosion(0, x, y + 20, z);
64 }
66 break;
67 case MOVE_MEGA_BOMB:
68 if (script->varTable[10] > 0) {
69 fx_explosion(2, x, y + 20, z);
70 } else {
71 fx_explosion(1, x, y + 20, z);
72 }
74 break;
75 default:
76 fx_explosion(0, x, y + 20, z);
78 break;
79 }
80
81 return ApiStatus_DONE2;
82}
83
84API_CALLABLE(N(SlowDown)) {
85 BattleStatus* battleStatus = &gBattleStatus;
86 Actor* partnerActor = battleStatus->partnerActor;
87 ActorState* partnerActorMovement = &partnerActor->state;
88
89 if (isInitialCall) {
90 partnerActor->state.curPos.x = partnerActor->curPos.x;
91 partnerActor->state.curPos.y = partnerActor->curPos.y;
92 partnerActor->state.curPos.z = partnerActor->curPos.z;
93 }
94
95 add_xz_vec3f(&partnerActorMovement->curPos, partnerActor->state.speed, partnerActor->state.angle);
96
97 if (partnerActor->state.speed < 4.0f) {
98 play_movement_dust_effects(0, partnerActor->state.curPos.x, partnerActor->state.curPos.y,
99 partnerActor->state.curPos.z, partnerActor->state.angle);
100 } else {
101 play_movement_dust_effects(1, partnerActor->state.curPos.x, partnerActor->state.curPos.y,
102 partnerActor->state.curPos.z, partnerActor->state.angle);
103 }
104
105 partnerActorMovement->speed /= 1.5;
106
107 partnerActor->curPos.x = partnerActorMovement->curPos.x;
108 partnerActor->curPos.y = partnerActorMovement->curPos.y;
109 partnerActor->curPos.z = partnerActorMovement->curPos.z;
110
111 if (partnerActorMovement->speed < 1.0) {
112 return ApiStatus_DONE2;
113 }
114
115 return ApiStatus_BLOCK;
116}
117
118API_CALLABLE(N(GetBombDamage)) {
119 Bytecode* args = script->ptrReadPos;
120 BattleStatus* battleStatus = &gBattleStatus;
121 Actor* partnerActor = battleStatus->partnerActor;
122 s32 mashResult = evt_get_variable(script, *args++);
123 s32 damage = 0;
124
125 switch (partnerActor->actorBlueprint->level) {
127 if (mashResult <= 35) {
128 damage = 1;
129 } else if (mashResult <= 60) {
130 damage = 2;
131 } else if (mashResult <= 80) {
132 damage = 3;
133 } else if (mashResult <= 99) {
134 damage = 4;
135 } else {
136 damage = 5;
137 }
138 break;
140 if (mashResult <= 35) {
141 damage = 1;
142 } else if (mashResult <= 60) {
143 damage = 3;
144 } else if (mashResult <= 80) {
145 damage = 4;
146 } else if (mashResult <= 99) {
147 damage = 5;
148 } else {
149 damage = 6;
150 }
151 break;
153 if (mashResult <= 35) {
154 damage = 1;
155 } else if (mashResult <= 60) {
156 damage = 3;
157 } else if (mashResult <= 80) {
158 damage = 5;
159 } else if (mashResult <= 99) {
160 damage = 6;
161 } else {
162 damage = 7;
163 }
164 break;
165 }
166
167 if (mashResult > 99) {
168 script->varTable[0] = TRUE;
169 } else {
170 script->varTable[0] = FALSE;
171 }
172
173 script->varTable[15] = damage;
174
175 return ApiStatus_DONE2;
176}
177
178API_CALLABLE(N(GetPowerBombDamage)) {
179 Bytecode* args = script->ptrReadPos;
180 BattleStatus* battleStatus = &gBattleStatus;
181 Actor* partnerActor = battleStatus->partnerActor;
182 s32 mashResult = evt_get_variable(script, *args++);
183 s32 damage = 0;
184
185 switch (partnerActor->actorBlueprint->level) {
187 if (mashResult <= 35) {
188 damage = 1;
189 } else if (mashResult <= 60) {
190 damage = 3;
191 } else if (mashResult <= 80) {
192 damage = 4;
193 } else if (mashResult <= 99) {
194 damage = 5;
195 } else {
196 damage = 6;
197 }
198 break;
200 if (mashResult <= 35) {
201 damage = 1;
202 } else if (mashResult <= 60) {
203 damage = 3;
204 } else if (mashResult <= 80) {
205 damage = 5;
206 } else if (mashResult <= 99) {
207 damage = 6;
208 } else {
209 damage = 7;
210 }
211 break;
212 }
213
214 if (mashResult > 99) {
215 script->varTable[0] = TRUE;
216 } else {
217 script->varTable[0] = FALSE;
218 }
219
220 script->varTable[15] = damage;
221
222 return ApiStatus_DONE2;
223}
224
225API_CALLABLE(N(GetMegaBombDamage)) {
226 Bytecode* args = script->ptrReadPos;
227 BattleStatus* battleStatus = &gBattleStatus;
228 Actor* partnerActor = battleStatus->partnerActor;
229 s32 mashResult = evt_get_variable(script, *args++);
230 s32 damage = 0;
231
232 switch (partnerActor->actorBlueprint->level) {
234 if (mashResult <= 35) {
235 damage = 1;
236 } else if (mashResult <= 60) {
237 damage = 3;
238 } else if (mashResult <= 80) {
239 damage = 5;
240 } else if (mashResult <= 99) {
241 damage = 6;
242 } else {
243 damage = 7;
244 }
245 break;
246 }
247
248 if (mashResult > 99) {
249 script->varTable[0] = TRUE;
250 } else {
251 script->varTable[0] = FALSE;
252 }
253
254 script->varTable[15] = damage;
255
256 return ApiStatus_DONE2;
257}
258
259s32 N(DefaultAnims)[] = {
260 STATUS_KEY_NORMAL, ANIM_BattleBombette_Walk,
261 STATUS_KEY_STONE, ANIM_BattleBombette_Still,
262 STATUS_KEY_SLEEP, ANIM_BattleBombette_Sleep,
263 STATUS_KEY_POISON, ANIM_BattleBombette_Still,
264 STATUS_KEY_STOP, ANIM_BattleBombette_Still,
265 STATUS_KEY_DAZE, ANIM_BattleBombette_Injured,
266 STATUS_KEY_INACTIVE, ANIM_BattleBombette_Still,
268};
269
270s32 N(DefenseTable)[] = {
273};
274
275s32 N(StatusTable)[] = {
278 STATUS_KEY_SLEEP, 100,
281 STATUS_KEY_DIZZY, 100,
282 STATUS_KEY_FEAR, 100,
286 STATUS_KEY_STOP, 100,
298};
299
300ActorPartBlueprint N(ActorParts)[] = {
301 {
302 .flags = 0,
303 .index = PRT_MAIN,
304 .posOffset = { 0, 0, 0 },
305 .targetOffset = { 9, 20 },
306 .opacity = 255,
307 .idleAnimations = N(DefaultAnims),
308 .defenseTable = N(DefenseTable),
309 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
310 .elementImmunityFlags = 0,
311 .projectileTargetOffset = { 0, 0 },
312 },
313};
314
315ActorBlueprint NAMESPACE = {
316 .flags = 0,
317 .type = ACTOR_TYPE_BOMBETTE,
318 .level = ACTOR_LEVEL_BOMBETTE,
319 .maxHP = 99,
320 .partCount = ARRAY_COUNT(N(ActorParts)),
321 .partsData = N(ActorParts),
322 .initScript = &N(EVS_Init),
323 .statusTable = N(StatusTable),
324 .escapeChance = 0,
325 .airLiftChance = 0,
326 .hurricaneChance = 0,
327 .spookChance = 0,
328 .upAndAwayChance = 0,
329 .spinSmashReq = 4,
330 .powerBounceChance = 80,
331 .coinReward = 0,
332 .size = { 30, 28 },
333 .healthBarOffset = { 0, 0 },
334 .statusIconOffset = { -10, 20 },
335 .statusTextOffset = { 10, 20 },
336};
337
338EvtScript N(EVS_Init) = {
339 Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn)))
340 Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle)))
341 Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent)))
342 Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase)))
343 Return
344 End
345};
346
347EvtScript N(EVS_Idle) = {
348 Return
349 End
350};
351
352EvtScript N(EVS_HandleEvent) = {
353 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
354 Call(CloseActionCommandInfo)
356 Call(GetLastEvent, ACTOR_PARTNER, LVar0)
360 SetConst(LVar1, ANIM_BattleBombette_Hurt)
361 SetConst(LVar2, ANIM_BattleBombette_Backfire2)
363 SetConst(LVar1, ANIM_BattleBombette_Hurt)
368 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
369 SetConst(LVar0, PRT_MAIN)
370 SetConst(LVar1, ANIM_BattleBombette_Hurt)
374 SetConst(LVar1, ANIM_BattleBombette_Hurt)
375 Set(LVar2, 15)
376 SetConst(LVar3, ANIM_BattleBombette_Injured)
378 SetConst(LVar1, ANIM_BattleBombette_Hurt)
381 SetConst(LVar1, ANIM_BattleBombette_BurnHurt)
382 SetConst(LVar2, ANIM_BattleBombette_BurnStill)
384 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
385 Set(LVarA, 0)
386 Call(N(PlayExplosionFX), LVar0, LVar1, LVar2)
387 Thread
388 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
389 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
390 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0))
391 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
392 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5))
393 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8))
394 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3))
395 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1))
397 Thread
398 Set(LVar0, 0)
399 Loop(80)
400 Wait(1)
401 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
402 Add(LVar0, 33)
403 EndLoop
404 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
406 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
407 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
408 Add(LVar1, 200)
409 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
410 Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR)
411 Wait(50)
412 Call(SetGoalToHome, ACTOR_PARTNER)
413 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
414 Add(LVar1, 200)
415 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
416 Call(SetGoalToHome, ACTOR_PARTNER)
417 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
418 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6))
419 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
420 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
421 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
422 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
423 Set(LVar1, 0)
424 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
425 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
426 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
427 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
428 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
429 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
430 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
431 SetConst(LVar1, ANIM_BattleBombette_Hurt)
434 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
435 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
436 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_SPIKE)
437 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
438 Sub(LVar0, 60)
439 Add(LVar1, 40)
440 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
441 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt)
442 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BurnHurt)
443 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
444 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
445 SetConst(LVar1, ANIM_BattleBombette_BurnHurt)
446 SetConst(LVar2, ANIM_BattleBombette_BurnStill)
448 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
449 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
450 Set(LVarA, 0)
451 Call(N(PlayExplosionFX), LVar0, LVar1, LVar2)
452 Thread
453 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
454 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
455 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0))
456 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
457 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5))
458 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8))
459 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3))
460 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1))
462 Thread
463 Set(LVar0, 0)
464 Loop(80)
465 Wait(1)
466 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
467 Add(LVar0, 33)
468 EndLoop
469 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
471 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
472 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
473 Add(LVar1, 200)
474 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
475 Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR)
476 Wait(50)
477 Call(SetGoalToHome, ACTOR_PARTNER)
478 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
479 Add(LVar1, 200)
480 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
481 Call(SetGoalToHome, ACTOR_PARTNER)
482 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
483 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6))
484 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
485 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
486 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
487 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
488 Set(LVar1, 0)
489 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
490 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
491 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
492 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
493 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
494 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
495 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
496 SetConst(LVar1, ANIM_BattleBombette_Hurt)
499 SetConst(LVar1, ANIM_BattleBombette_Hurt)
500 Set(LVar2, 15)
501 SetConst(LVar3, ANIM_BattleBombette_Injured)
502 Set(LVarA, LVar1)
503 Set(LVarB, LVar2)
504 Set(LVarC, LVar3)
505 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
506 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
507 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
508 Call(UseBattleCamPreset, BTL_CAM_PARTNER_HIT_HAZARD)
509 Call(SetAnimation, ACTOR_PARTNER, -1, LVarA)
510 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
511 Sub(LVar0, 60)
512 Add(LVar1, 40)
513 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1))
514 Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA)
515 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
516 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE)
517 Call(ShowShockEffect, ACTOR_SELF)
518 Set(LVar1, LVarA)
519 Set(LVar2, 0)
521 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Fall)
522 Wait(8)
523 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
524 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
525 Set(LVarA, 0)
526 Call(N(PlayExplosionFX), LVar0, LVar1, LVar2)
527 Thread
528 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
529 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
530 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0))
531 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0))
532 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5))
533 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8))
534 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3))
535 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1))
537 Thread
538 Set(LVar0, 0)
539 Loop(80)
540 Wait(1)
541 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
542 Add(LVar0, 33)
543 EndLoop
544 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
546 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
547 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
548 Add(LVar1, 200)
549 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
550 Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR)
551 Wait(50)
552 Call(SetGoalToHome, ACTOR_PARTNER)
553 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
554 Add(LVar1, 200)
555 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
556 Call(SetGoalToHome, ACTOR_PARTNER)
557 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
558 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6))
559 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
560 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
561 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
562 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
563 Set(LVar1, 0)
564 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0))
565 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
566 Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
567 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
568 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
569 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
570 Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE)
571 SetConst(LVar1, ANIM_BattleBombette_Hurt)
574 SetConst(LVar1, ANIM_BattleBombette_Hurt)
577 SetConst(LVar0, PRT_MAIN)
578 SetConst(LVar1, ANIM_BattleBombette_Idle)
579 SetConst(LVar2, ANIM_BattleBombette_Run)
580 Set(LVar3, 0)
584 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
585 SetConst(LVar0, PRT_MAIN)
586 SetConst(LVar1, ANIM_BattleBombette_Block)
588 Wait(10)
592 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
593 Return
594 End
595};
596
597EvtScript N(EVS_TakeTurn) = {
598 Call(GetBattlePhase, LVar0)
601 ExecWait(N(EVS_FirstStrike))
603 ExecWait(N(EVS_ExecuteAction))
605 ExecWait(N(EVS_Celebrate))
607 ExecWait(N(EVS_RunAway))
611 Return
612 End
613};
614
615EvtScript N(EVS_Celebrate) = {
616 SetConst(LVar0, PRT_MAIN)
617 SetConst(LVar1, ANIM_BattleBombette_CelebrateLoop)
618 SetConst(LVar2, ANIM_BattleBombette_Celebrate)
619 SetConst(LVar3, ANIM_BattleBombette_Idle)
621 Return
622 End
623};
624
625EvtScript N(EVS_ExecuteAction) = {
626 Call(ShowActionHud, TRUE)
627 Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
628 Call(GetMenuSelection, LVar0, LVar1, LVar2)
631 Call(LoadStarPowerScript)
633 Return
635 Call(GetMenuSelection, LVar0, LVar1, LVar2)
637 CaseEq(MOVE_BODY_SLAM1)
638 ExecWait(N(EVS_Attack_BodySlam))
639 CaseEq(MOVE_BODY_SLAM2)
640 ExecWait(N(EVS_Attack_BodySlam))
641 CaseEq(MOVE_BODY_SLAM3)
642 ExecWait(N(EVS_Attack_BodySlam))
643 CaseEq(MOVE_BOMB)
644 ExecWait(N(EVS_Attack_Bomb))
645 CaseEq(MOVE_POWER_BOMB)
646 ExecWait(N(EVS_Attack_Bomb))
647 CaseEq(MOVE_MEGA_BOMB)
648 ExecWait(N(EVS_Attack_Bomb))
650 Return
651 End
652};
653
654EvtScript N(EVS_FirstStrike) = {
655 Call(GetMenuSelection, LVar0, LVar1, LVar2)
657 CaseEq(MOVE_BODY_SLAM1)
658 ExecWait(N(EVS_Attack_FirstStrike))
659 CaseEq(MOVE_BODY_SLAM2)
660 ExecWait(N(EVS_Attack_FirstStrike))
661 CaseEq(MOVE_BODY_SLAM3)
662 ExecWait(N(EVS_Attack_FirstStrike))
664 Return
665 End
666};
667
668EvtScript N(EVS_RunAway) = {
669 SetConst(LVar0, PRT_MAIN)
670 SetConst(LVar1, ANIM_BattleBombette_Run)
672 Return
673 End
674};
675
677 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
678 Call(SetGoalToHome, ACTOR_PARTNER)
679 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
680 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run)
681 Call(SetActorYaw, ACTOR_PARTNER, 0)
682 Call(RunToGoal, ACTOR_PARTNER, 0)
683 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
684 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
685 Return
686 End
687};
688
689EvtScript N(EVS_HandlePhase) = {
690 Return
691 End
692};
693
694EvtScript N(EVS_ReturnHome_Success) = {
695 Call(PartnerYieldTurn)
696 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
697 Call(MoveBattleCamOver, 10)
698 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
699 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
700 Sub(LVar0, 60)
701 Set(LVar1, 0)
702 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
703 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
704 Call(JumpToGoal, ACTOR_PARTNER, 25, FALSE, TRUE, FALSE)
705 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
706 Wait(1)
707 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
708 Sub(LVar0, 30)
709 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
710 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
711 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
712 Wait(1)
713 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
714 Sub(LVar0, 20)
715 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
716 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE)
717 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
718 Wait(1)
719 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
720 Sub(LVar0, 10)
721 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
722 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
723 Wait(1)
724 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
725 Wait(8)
726 Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK)
727 Call(SetGoalToHome, ACTOR_PARTNER)
728 Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0))
729 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run)
730 Call(RunToGoal, ACTOR_PARTNER, 0)
731 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
732 Return
733 End
734};
735
736EvtScript N(EVS_ReturnHome_Miss) = {
737 Call(PartnerYieldTurn)
738 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
739 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
740 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
741 Sub(LVar0, 40)
742 Set(LVar1, 0)
743 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
744 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
745 Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
746 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
747 Wait(1)
748 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
749 Sub(LVar0, 30)
750 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
751 Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE)
752 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
753 Wait(1)
754 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
755 Sub(LVar0, 20)
756 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
757 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE)
758 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
759 Wait(1)
760 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2)
761 Sub(LVar0, 10)
762 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE)
763 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1)
764 Wait(1)
765 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
766 Wait(8)
767 Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK)
768 Call(SetGoalToHome, ACTOR_PARTNER)
769 Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0))
770 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run)
771 Call(RunToGoal, ACTOR_PARTNER, 0)
772 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
773 Return
774 End
775};
776
777EvtScript N(runToTarget) = {
778 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run)
779 Call(RunToGoal, ACTOR_PARTNER, 35)
780 Return
781 End
782};
783
784EvtScript N(animBrace) = {
785 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Brace)
786 Loop(15)
787 Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0)
788 Wait(1)
789 Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0)
790 Wait(1)
791 EndLoop
792 Return
793 End
794};
795
796EvtScript N(animHold) = {
797 Loop(15)
798 Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0)
799 Wait(1)
800 Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0)
801 Wait(1)
802 EndLoop
803 Return
804 End
805};
806
807EvtScript N(EVS_Attack_BodySlam) = {
808 Call(LoadActionCommand, ACTION_COMMAND_BODY_SLAM)
809 Call(action_command_body_slam_init)
810 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
811 Wait(10)
812 Call(UseBattleCamPreset, BTL_CAM_CLOSER_PARTNER_APPROACH)
813 Call(InitTargetIterator)
814 Call(SetGoalToTarget, ACTOR_PARTNER)
815 Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0)
817 Loop(60)
818 Call(CheckButtonDown, BUTTON_A, LVar0)
819 IfNe(LVar0, FALSE)
822 EndIf
823 Wait(1)
824 EndLoop
825 Call(MoveBattleCamOver, 65)
827 Call(action_command_body_slam_start, 0, 92, 3, 0)
828 Set(LF_MashEnded, 0)
829 ExecGetTID(N(runToTarget), LVarA)
830 Loop(35)
831 Call(CheckButtonDown, BUTTON_A, LVar0)
832 IfEq(LVar0, FALSE)
833 Set(LF_MashEnded, 1)
835 EndIf
836 Wait(1)
837 EndLoop
840 Goto(10)
841 EndIf
842 Set(LF_MashEnded, 0)
843 ExecGetTID(N(animBrace), LVarA)
844 Loop(30)
845 Call(CheckButtonDown, BUTTON_A, LVar0)
846 IfEq(LVar0, FALSE)
847 Set(LF_MashEnded, 1)
849 EndIf
850 Wait(1)
851 EndLoop
854 Goto(10)
855 EndIf
857 ExecGetTID(N(animHold), LVarA)
858 Loop(30)
859 Call(CheckButtonDown, BUTTON_A, LVar0)
860 IfEq(LVar0, FALSE)
861 Set(LF_MashEnded, 1)
863 EndIf
864 Wait(1)
865 EndLoop
868 Goto(10)
869 EndIf
870 EndIf
871 Else
872 Set(LF_MashEnded, 0)
873 ExecGetTID(N(runToTarget), LVarA)
874 Loop(35)
875 Call(CheckButtonDown, BUTTON_A, LVar0)
876 IfNe(LVar0, FALSE)
878 Call(action_command_body_slam_start, 0, 92, 3, 0)
880 EndIf
881 EndIf
883 IfEq(LVar0, FALSE)
884 Set(LF_MashEnded, 1)
886 EndIf
887 EndIf
888 Wait(1)
889 EndLoop
892 Goto(10)
893 EndIf
894 Set(LF_MashEnded, 0)
895 ExecGetTID(N(animBrace), LVarA)
896 Loop(30)
897 Call(CheckButtonDown, BUTTON_A, LVar0)
898 IfNe(LVar0, FALSE)
900 Call(action_command_body_slam_start, 0, 92, 3, 0)
902 EndIf
903 EndIf
905 IfEq(LVar0, FALSE)
906 Set(LF_MashEnded, 1)
908 EndIf
909 EndIf
910 Wait(1)
911 EndLoop
914 Goto(10)
915 EndIf
917 ExecGetTID(N(animHold), LVarA)
918 Loop(30)
919 Call(CheckButtonDown, BUTTON_A, LVar0)
920 IfEq(LVar0, FALSE)
921 Set(LF_MashEnded, 1)
923 EndIf
924 Wait(1)
925 EndLoop
928 Goto(10)
929 EndIf
930 EndIf
931 EndIf
932 Label(10)
933 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0)
934 Wait(2)
935 Call(CloseActionCommandInfo)
939 Call(SetGoalToTarget, ACTOR_PARTNER)
940 Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0)
941 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam)
942 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
944 Call(RunToGoal, ACTOR_PARTNER, 0)
945 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
946 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
947 Thread
948 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 15, 0)
949 Set(LVar0, 0)
950 Loop(10)
951 Add(LVar0, -72)
952 Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0)
953 Wait(1)
954 EndLoop
955 Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0)
957 Call(AddGoalPos, ACTOR_PARTNER, 60, 0, 0)
958 Call(RunToGoal, ACTOR_PARTNER, 10)
959 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
960 Thread
961 Call(N(SlowDown))
963 Wait(20)
964 Call(SetGoalToHome, ACTOR_PARTNER)
965 Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0))
966 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run)
967 Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK)
968 Call(RunToGoal, ACTOR_PARTNER, 0)
969 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
970 Return
971 EndIf
972 Call(GetMenuSelection, LVar0, LVar1, LVar2)
974 CaseEq(MOVE_BODY_SLAM1)
975 Set(LVarE, 1)
976 Set(LVarF, 2)
977 CaseEq(MOVE_BODY_SLAM2)
978 Set(LVarE, 2)
979 Set(LVarF, 3)
980 CaseEq(MOVE_BODY_SLAM3)
981 Set(LVarE, 3)
982 Set(LVarF, 5)
985 Call(GetPartnerActionSuccess, LVar0)
986 IfGt(LVar0, 0)
987 Call(SetGoalToTarget, ACTOR_PARTNER)
988 Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0)
989 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam)
990 Call(RunToGoal, ACTOR_PARTNER, 3)
991 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
992 Else
993 Call(SetGoalToTarget, ACTOR_PARTNER)
994 Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0)
995 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam)
996 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
997 Call(RunToGoal, ACTOR_PARTNER, 0)
998 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
999 EndIf
1000 Switch(LVar0)
1001 CaseGt(0)
1005 EndSwitch
1006 Switch(LVar0)
1009 ExecWait(N(EVS_ReturnHome_Miss))
1013 ExecWait(N(EVS_ReturnHome_Success))
1015 EndSwitch
1016 Return
1017 End
1018};
1019
1020EvtScript N(EVS_Attack_Bomb) = {
1021 Call(LoadActionCommand, ACTION_COMMAND_BOMB)
1022 Call(action_command_bomb_init)
1023 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1024 Switch(LVar2)
1025 CaseEq(MOVE_BOMB)
1026 Call(GetActorLevel, ACTOR_PARTNER, LVar0)
1027 Switch(LVar0)
1028 CaseEq(0)
1029 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1030 CaseEq(1)
1031 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1032 CaseEq(2)
1033 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1034 EndSwitch
1035 CaseEq(MOVE_POWER_BOMB)
1036 Call(GetActorLevel, ACTOR_PARTNER, LVar0)
1037 Switch(LVar0)
1038 CaseEq(1)
1039 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1040 CaseEq(2)
1041 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1042 EndSwitch
1043 CaseEq(MOVE_MEGA_BOMB)
1044 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
1045 EndSwitch
1046 Wait(10)
1047 Call(UseBattleCamPreset, BTL_CAM_CLOSER_PARTNER_APPROACH)
1048 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1049 Switch(LVar2)
1050 CaseEq(MOVE_BOMB)
1051 Call(InitTargetIterator)
1052 Call(SetGoalToTarget, ACTOR_PARTNER)
1053 Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0)
1054 CaseEq(MOVE_POWER_BOMB)
1055 Call(InitTargetIterator)
1056 Call(SetGoalToTarget, ACTOR_PARTNER)
1057 Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0)
1058 CaseEq(MOVE_MEGA_BOMB)
1059 Call(InitTargetIterator)
1060 Call(SetGoalToTarget, ACTOR_PARTNER)
1061 Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0)
1062 EndSwitch
1063 Call(MoveBattleCamOver, 60 * DT)
1064 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1065 Switch(LVar2)
1066 CaseEq(MOVE_BOMB)
1067 Call(action_command_bomb_start, 0, 57 * DT, 3, 0)
1068 CaseEq(MOVE_POWER_BOMB)
1069 Call(action_command_bomb_start, 0, 73 * DT - 1, 3, 1)
1070 CaseEq(MOVE_MEGA_BOMB)
1071 Call(action_command_bomb_start, 0, 87 * DT, 3, 2)
1072 EndSwitch
1073 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE)
1075 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1)
1076 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_RunLit)
1077 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1078 Switch(LVar2)
1079 CaseEq(MOVE_BOMB)
1080 Set(LVar0, 45 * DT)
1081 CaseEq(MOVE_POWER_BOMB)
1082 Set(LVar0, 50 * DT)
1083 CaseEq(MOVE_MEGA_BOMB)
1084 Set(LVar0, 50 * DT)
1085 EndSwitch
1086 Call(RunToGoal, ACTOR_PARTNER, 45 * DT)
1087 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode)
1088 Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0)
1090 Switch(LVar2)
1091 CaseEq(MOVE_BOMB)
1092 Set(LVar0, 45 * DT)
1093 CaseEq(MOVE_POWER_BOMB)
1094 Set(LVar0, 50 * DT)
1095 CaseEq(MOVE_MEGA_BOMB)
1096 Set(LVar0, 50 * DT)
1097 EndSwitch
1098 Wait(LVar0)
1099 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1100 Switch(LVar2)
1101 CaseEq(MOVE_BOMB)
1103 EndSwitch
1105 Switch(LVar2)
1106 CaseEq(MOVE_BOMB)
1107 Set(LVar0, 6 * DT + 1)
1108 CaseEq(MOVE_POWER_BOMB)
1109 Set(LVar0, 12 * DT)
1110 CaseEq(MOVE_MEGA_BOMB)
1111 Set(LVar0, 20 * DT)
1112 EndSwitch
1113 Loop(LVar0)
1114 Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0)
1115 Wait(1)
1116 Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0)
1117 Wait(1)
1118 EndLoop
1119 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0)
1120 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1121 Call(MoveBattleCamOver, 8)
1122 Call(GetActionSuccessCopy, LVar0)
1123 Call(N(GetBombDamage), LVar0)
1124 Set(LVarA, LVar0)
1125 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1126 Call(N(PlayExplosionFX), LVar0, LVar1, LVar2)
1127 Thread
1128 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1129 Switch(LVar2)
1130 CaseEq(MOVE_BOMB)
1131 IfGt(LVarA, 0)
1132 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
1133 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75))
1134 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1135 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5))
1136 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1137 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0))
1138 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1139 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25))
1140 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2))
1141 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45))
1142 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15))
1143 Else
1144 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
1145 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.4))
1146 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1147 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.4))
1148 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1149 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.2))
1150 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1151 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.2))
1152 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.64))
1153 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.24))
1154 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.08))
1155 EndIf
1156 CaseEq(MOVE_POWER_BOMB)
1157 IfGt(LVarA, 0)
1158 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
1159 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75))
1160 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1161 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5))
1162 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1163 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0))
1164 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1165 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25))
1166 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2))
1167 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45))
1168 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15))
1169 Else
1170 Call(StartRumble, BTL_RUMBLE_HIT_EXTREME)
1171 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.4))
1172 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1173 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.4))
1174 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1175 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.2))
1176 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6))
1177 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.2))
1178 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.64))
1179 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.24))
1180 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.08))
1181 EndIf
1182 CaseEq(MOVE_MEGA_BOMB)
1183 IfGt(LVarA, 0)
1184 Call(StartRumble, BTL_RUMBLE_HIT_MAX)
1185 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0))
1186 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0))
1187 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0))
1188 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0))
1189 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(8.0))
1190 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0))
1191 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(3.0))
1192 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.6))
1193 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.6))
1194 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.2))
1195 Else
1196 Call(StartRumble, BTL_RUMBLE_HIT_MAX)
1197 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
1198 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0))
1199 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1200 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0))
1201 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0))
1202 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0))
1203 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.5))
1204 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.8))
1205 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.3))
1206 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.1))
1207 EndIf
1208 EndSwitch
1209 EndThread
1210 Thread
1211 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1212 Switch(LVar2)
1213 CaseEq(MOVE_BOMB)
1214 CaseEq(MOVE_POWER_BOMB)
1215 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1216 Wait(8)
1217 IfGt(LVarA, 0)
1218 PlayEffect(EFFECT_RED_IMPACT, 0, LVar0, 0, LVar2, 1, 0, 0)
1219 Else
1220 PlayEffect(EFFECT_RED_IMPACT, 1, LVar0, 0, LVar2, 1, 0, 0)
1221 EndIf
1222 CaseEq(MOVE_MEGA_BOMB)
1223 Set(LVarA, 0)
1224 Wait(10)
1225 Call(N(PlayExplosionFX), 88, 33, 5)
1226 Wait(10)
1227 Call(N(PlayExplosionFX), 18, 73, 5)
1228 Wait(10)
1229 Call(N(PlayExplosionFX), 120, 19, 5)
1230 Wait(10)
1231 EndSwitch
1232 EndThread
1233 Set(LF_MashEnded, 0)
1234 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1235 Switch(LVar2)
1236 CaseEq(MOVE_BOMB)
1237 Call(SetGoalToTarget, ACTOR_PARTNER)
1238 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1)
1240 IfEq(LVar0, 6)
1242 EndIf
1243 Call(GetActionSuccessCopy, LVar0)
1244 Call(N(GetBombDamage), LVar0)
1245 Switch(LVar0)
1246 CaseGt(0)
1248 Set(LF_MashEnded, 1)
1251 EndSwitch
1252 CaseEq(MOVE_POWER_BOMB)
1253 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1)
1254 Label(5)
1255 Call(SetGoalToTarget, ACTOR_PARTNER)
1257 IfEq(LVar0, 6)
1258 Goto(6)
1259 EndIf
1260 Call(GetActionSuccessCopy, LVar0)
1261 Call(N(GetPowerBombDamage), LVar0)
1262 Switch(LVar0)
1263 CaseGt(0)
1265 Set(LF_MashEnded, 1)
1268 EndSwitch
1269 Label(6)
1270 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1272 Goto(5)
1273 EndIf
1274 CaseEq(MOVE_MEGA_BOMB)
1275 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV3)
1276 Label(10)
1277 Call(SetGoalToTarget, ACTOR_PARTNER)
1279 IfEq(LVar0, 6)
1280 Goto(11)
1281 EndIf
1282 Call(GetActionSuccessCopy, LVar0)
1283 Call(N(GetMegaBombDamage), LVar0)
1284 Switch(LVar0)
1285 CaseGt(0)
1287 Set(LF_MashEnded, 1)
1290 EndSwitch
1291 Label(11)
1292 Wait(5)
1293 Call(ChooseNextTarget, ITER_NEXT, LVar0)
1295 Goto(10)
1296 EndIf
1297 EndSwitch
1298 IfGt(LF_MashEnded, 0)
1299 Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME)
1300 Call(MoveBattleCamOver, 10)
1301 Else
1302 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
1303 EndIf
1304 Set(LVar0, 0)
1305 Switch(LVar0)
1308 CaseOrEq(1)
1309 CaseOrEq(3)
1310 Thread
1311 Set(LVar0, 0)
1312 Loop(80)
1313 Wait(1)
1314 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1315 Add(LVar0, 33)
1316 EndLoop
1317 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1318 EndThread
1319 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
1320 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1321 Sub(LVar0, 50)
1322 Add(LVar1, 200)
1323 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1324 Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR)
1325 Wait(50)
1326 Call(PartnerYieldTurn)
1327 Call(SetGoalToHome, ACTOR_PARTNER)
1328 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1329 Add(LVar0, 25)
1330 Add(LVar1, 200)
1331 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1332 Call(SetGoalToHome, ACTOR_PARTNER)
1333 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
1334 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6))
1335 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
1336 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
1337 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
1339 EndSwitch
1340 Return
1341 End
1342};
1343
1344EvtScript N(EVS_Attack_FirstStrike) = {
1345 Call(InitTargetIterator)
1346 Call(SetGoalToTarget, ACTOR_PARTNER)
1347 Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0)
1348 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1349 Set(LVar1, 0)
1350 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1351 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE)
1352 Call(UseBattleCamPresetImmediately, BTL_CAM_MIDPOINT_NORMAL)
1353 Call(BattleCamTargetActor, ACTOR_SELF)
1354 Call(MoveBattleCamOver, 1)
1355 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode)
1356 Wait(5)
1358 Wait(10)
1360 Loop(7)
1361 Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0)
1362 Wait(1)
1363 Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0)
1364 Wait(1)
1365 EndLoop
1366 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0)
1367 Set(LVarA, 0)
1368 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1369 Call(N(PlayExplosionFX), LVar0, LVar1, LVar2)
1370 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
1371 Call(MoveBattleCamOver, 8)
1372 Thread
1373 Call(StartRumble, BTL_RUMBLE_HIT_HEAVY)
1374 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75))
1375 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1376 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5))
1377 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1378 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0))
1379 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0))
1380 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25))
1381 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2))
1382 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45))
1383 Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15))
1384 EndThread
1385 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1)
1388 Goto(10)
1389 EndIf
1390 Set(LVarF, 1)
1391 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1392 Switch(LVar2)
1393 CaseEq(MOVE_BODY_SLAM1)
1394 Set(LVarF, 5)
1395 CaseEq(MOVE_BODY_SLAM2)
1396 Set(LVarF, 6)
1397 CaseEq(MOVE_BODY_SLAM3)
1398 Set(LVarF, 7)
1399 EndSwitch
1401 Label(10)
1402 Set(LVar0, 0)
1403 Switch(LVar0)
1406 CaseOrEq(1)
1407 CaseOrEq(3)
1408 Thread
1409 Set(LVar0, 0)
1410 Loop(80)
1411 Wait(1)
1412 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1413 Add(LVar0, 33)
1414 EndLoop
1415 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
1416 EndThread
1417 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
1418 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1419 Sub(LVar0, 50)
1420 Add(LVar1, 200)
1421 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1422 Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR)
1423 Wait(50)
1424 Call(SetGoalToHome, ACTOR_PARTNER)
1425 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1426 Add(LVar0, 25)
1427 Add(LVar1, 200)
1428 Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1429 Call(SetGoalToHome, ACTOR_PARTNER)
1430 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
1431 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6))
1432 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath)
1433 Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE)
1434 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle)
1436 EndSwitch
1437 Return
1438 End
1439};
@ LF_MashEnded
Definition bombette.c:34
@ LF_MashStarted
Definition bombette.c:35
struct ActorBlueprint * actorBlueprint
ActorState state
Vec3f curPos
Bytecode EvtScript[]
@ ACTION_COMMAND_BOMB
Definition enums.h:3483
@ ACTION_COMMAND_BODY_SLAM
Definition enums.h:3484
@ BUTTON_A
Definition enums.h:2790
@ 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_EVENT_FLAGS_NONE
Definition enums.h:3370
@ 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
@ 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_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_MIDPOINT_NORMAL
Definition enums.h:4833
@ BTL_CAM_RETURN_HOME
Definition enums.h:4826
@ BTL_CAM_CLOSER_PARTNER_APPROACH
Definition enums.h:4870
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ BTL_CAM_PARTNER_HIT_SPIKE
Definition enums.h:4883
@ BTL_CAM_PARTNER_HIT_HAZARD
Definition enums.h:4884
@ BTL_CAM_PARTNER_MISTAKE
Definition enums.h:4873
@ SUPPRESS_EVENT_SPIKY_TOP
Definition enums.h:2900
@ SUPPRESS_EVENT_ALT_SPIKY
Definition enums.h:2905
@ SUPPRESS_EVENT_SPIKY_FRONT
Definition enums.h:2902
@ SUPPRESS_EVENT_BURN_CONTACT
Definition enums.h:2904
@ EASING_LINEAR
Definition enums.h:510
@ PARTNER_RANK_NORMAL
Definition enums.h:2018
@ PARTNER_RANK_SUPER
Definition enums.h:2019
@ PARTNER_RANK_ULTRA
Definition enums.h:2020
@ SOUND_BOMBETTE_BLAST_LV2
Definition enums.h:1332
@ SOUND_BOMBETTE_BLAST_LV3
Definition enums.h:1333
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ SOUND_LRAW_BOMBETTE_FUSE
Definition enums.h:998
@ SOUND_NONE
Definition enums.h:547
@ SOUND_BOMBETTE_BLAST_LV1
Definition enums.h:1331
@ SOUND_BOMBETTE_BODY_SLAM
Definition enums.h:1341
@ BTL_RUMBLE_HIT_HEAVY
Definition enums.h:4256
@ BTL_RUMBLE_HIT_MAX
Definition enums.h:4258
@ BTL_RUMBLE_HIT_EXTREME
Definition enums.h:4257
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
@ 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
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_BLAST
Definition enums.h:2860
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
#define ApiStatus_BLOCK
Definition evt.h:116
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
Definition 190B20.c:1139
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_Drop
EvtScript EVS_Partner_NoDamageHit
EvtScript EVS_Partner_BurnHit
EvtScript EVS_Partner_BombetteSpikeContact
EvtScript EVS_Partner_Celebrate
EvtScript EVS_RunAwayFail
EvtScript EVS_Partner_RunAway
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
ApiStatus StopSound(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 EndChildThread
Marks the end of a child thread block.
Definition macros.h:563
#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 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 Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define 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 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 KillThread(TID)
Kills a thread by its thread ID.
Definition macros.h:510
#define LVar2
Definition macros.h:150
#define DT
Definition macros.h:522
#define BreakSwitch
Marks the end of a switch case.
Definition macros.h:359
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#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 LFlag2
Definition macros.h:169
#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 ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#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 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