Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
goombario.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"
6#include "sprite/npc/BattleGoombario.h"
7
8#define NAMESPACE battle_partner_goombario
9
10extern s32 bActorTattles[];
11
12static EffectInstance* N(TattleWindowEffect);
13static b32 N(isCharged);
14extern s32 N(MultibonkChance);
15
16extern EvtScript N(EVS_Init);
17extern EvtScript N(EVS_Idle);
18extern EvtScript N(EVS_HandleEvent);
19extern EvtScript N(EVS_HandlePhase);
20extern EvtScript N(EVS_TakeTurn);
21extern EvtScript N(EVS_ExecuteAction);
22extern EvtScript N(EVS_Attack_Headbonk1);
23extern EvtScript N(EVS_Attack_Headbonk2);
24extern EvtScript N(EVS_Attack_Headbonk3);
25extern EvtScript N(EVS_Move_Tattle);
26extern EvtScript N(EVS_Move_Charge);
27extern EvtScript N(EVS_Move_Multibonk);
28extern EvtScript N(EVS_FirstStrike);
29extern EvtScript N(EVS_RunAway);
31extern EvtScript N(EVS_Celebrate);
32
33enum N(ActorPartIDs) {
34 PRT_MAIN = 1,
35};
36
37API_CALLABLE(N(GetReturnMoveTime)) {
38 BattleStatus* battleStatus = &gBattleStatus;
39 Actor* partner = battleStatus->partnerActor;
40 f32 posX = partner->curPos.x;
41 f32 posY = partner->curPos.y;
42 f32 posZ = partner->curPos.z;
43 f32 goalX = partner->state.goalPos.x;
44 f32 goalY = partner->state.goalPos.y;
45 f32 goalZ = partner->state.goalPos.z;
46
47 script->varTable[0] = (dist3D(posX, posY, posZ, goalX, goalY, goalZ) * 15.0f) / 100.0f;
48
49 if (script->varTable[0] >= 21) {
50 script->varTable[0] = 20;
51 }
52
54 if (script->varTable[0] < 10) {
55 script->varTable[0] = 10;
56 }
57 } else if (script->varTable[0] < 15) {
58 script->varTable[0] = 15;
59 }
60
61 return ApiStatus_DONE2;
62}
63
64API_CALLABLE(N(AdjustMultibonkChance)) {
65 Actor* targetActor = get_actor(get_actor(script->owner1.actorID)->targetActorID);
66
67 script->varTable[0] = 99;
68
69 N(MultibonkChance) *= targetActor->actorBlueprint->powerBounceChance;
70 N(MultibonkChance) /= 100;
71 if (N(MultibonkChance) < rand_int(100)) {
72 script->varTable[0] = 0;
73 }
74
75 return ApiStatus_DONE2;
76}
77
78API_CALLABLE(N(ResetMultibonkChance)) {
79 N(MultibonkChance) = 200;
80 return ApiStatus_DONE2;
81}
82
83API_CALLABLE(N(JumpOnTarget)) {
84 Bytecode* args = script->ptrReadPos;
85 BattleStatus* battleStatus = &gBattleStatus;
86 Actor* actor = battleStatus->partnerActor;
87 ActorState* state = &actor->state;
88 f32 stateCurrentX;
89 f32 stateCurrentZ;
90 f32 stateGoalX;
91 f32 stateGoalZ;
92 f32 oldActorY;
93 f32 oldActorX;
94 f64 currentPosX64;
95 f64 acc1, acc2;
96 f64 acc3, acc4;
97 f64 vel1, vel2;
98 f64 vel3, vel4;
99 f32 temp;
100
101 if (isInitialCall) {
102 actor->state.moveTime = evt_get_variable(script, *args++);
103 actor->state.moveArcAmplitude = evt_get_variable(script, *args++);
104 script->functionTemp[1] = 0;
105 script->functionTemp[0] = 0;
106 if (actor->state.moveArcAmplitude == 1) {
107 script->functionTemp[0] = 2;
108 }
109 }
110
111 if (script->functionTemp[0] == 0) {
112 state->curPos.x = actor->curPos.x;
113 state->curPos.y = actor->curPos.y;
114 stateGoalX = state->goalPos.x;
115 stateGoalZ = state->goalPos.z;
116 stateCurrentX = state->curPos.x;
117 stateCurrentZ = actor->curPos.z;
118 state->curPos.z = stateCurrentZ;
119 state->angle = atan2(stateCurrentX, stateCurrentZ, stateGoalX, stateGoalZ);
120 state->dist = dist2D(stateCurrentX, stateCurrentZ, stateGoalX, stateGoalZ);
121 if (state->moveTime == 0) {
122 state->moveTime = state->dist / state->speed;
123 temp = state->dist - (state->moveTime * state->speed);
124 } else {
125 state->speed = state->dist / state->moveTime;
126 temp = state->dist - (state->moveTime * state->speed);
127 }
128
129 if (state->moveTime == 0) {
130 return ApiStatus_DONE2;
131 }
132
133 state->velStep.x = (state->goalPos.x - state->curPos.x) / state->moveTime;
134 state->velStep.y = (state->goalPos.y - state->curPos.y) / state->moveTime;
135 state->velStep.z = (state->goalPos.z - state->curPos.z) / state->moveTime;
136 state->acceleration = PI_S / state->moveTime;
137 state->vel = 0.0f;
138 state->speed += temp / state->moveTime;
139
140 if (state->moveArcAmplitude < 3) {
141 state->unk_24 = 90.0f;
142 state->unk_28 = 360 / state->moveTime;
143 temp = state->dist;
144 temp -= 20.0;
145 temp /= 6.0;
146 temp += 47.0;
147 state->bounceDivisor = temp;
148 if (state->moveArcAmplitude == 2) {
149 state->bounceDivisor *= 1.12;
150 }
151 state->unk_18.x = 0.0f;
152 state->unk_18.y = 0.0f;
153 vel3 = state->vel;
154 acc3 = state->acceleration;
155 state->vel = vel3 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.53 * acc3) + acc3);
156 } else {
157 state->unk_24 = 90.0f;
158 state->unk_28 = 360 / state->moveTime;
159 temp = state->dist;
160 temp -= 20.0;
161 temp /= 6.0;
162 temp += 47.0;
163 state->bounceDivisor = temp;
164 if (state->moveArcAmplitude == 4) {
165 state->bounceDivisor *= 1.25;
166 }
167 state->unk_18.x = 0.0f;
168 state->unk_18.y = 0.0f;
169 vel4 = state->vel;
170 acc4 = state->acceleration;
171 state->vel = vel4 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.8 * acc4) + acc4);
172 }
173 set_actor_anim(ACTOR_PARTNER, PRT_MAIN, state->animJumpRise);
174 script->functionTemp[0] = 1;
175 }
176
177 switch (script->functionTemp[0]) {
178 case 1:
179 if (state->vel > PI_S / 2) {
180 set_actor_anim(ACTOR_PARTNER, PRT_MAIN, state->animJumpFall);
181 }
182 oldActorX = actor->curPos.x;
183 oldActorY = actor->curPos.y;
184 state->curPos.x += state->velStep.x;
185 state->curPos.y += state->velStep.y;
186 state->curPos.z += state->velStep.z;
187 state->unk_18.x = actor->curPos.y;
188 actor->curPos.x = state->curPos.x;
189 actor->curPos.y = state->curPos.y + (state->bounceDivisor * sin_rad(state->vel));
190 actor->curPos.z = state->curPos.z;
191 if (state->goalPos.y > actor->curPos.y && state->moveTime < 3) {
192 actor->curPos.y = state->goalPos.y;
193 }
194
195 actor->rot.z = -atan2(oldActorX, -oldActorY, actor->curPos.x, -actor->curPos.y);
196 state->unk_18.y = actor->curPos.y;
197 if (state->moveArcAmplitude < 3) {
198 vel1 = state->vel;
199 acc1 = state->acceleration;
200 state->vel = vel1 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.53 * acc1) + acc1);
201 } else {
202 vel2 = state->vel;
203 acc2 = state->acceleration;
204 state->vel = vel2 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.8 * acc2) + acc2);
205 }
206
207 state->unk_24 += state->unk_28;
208 state->unk_24 = clamp_angle(state->unk_24);
209 state->moveTime--;
210 if (state->moveTime == 0) {
211 actor->curPos.y = state->goalPos.y;
212 state->acceleration = 1.8f;
213 state->vel = -(state->unk_18.x - state->unk_18.y);
214 set_actor_anim(ACTOR_PARTNER, PRT_MAIN, state->animJumpLand);
215 return ApiStatus_DONE1;
216 }
217 break;
218 case 2:
220 return ApiStatus_DONE2;
221 }
222 state->moveTime = 1;
223 state->acceleration = 1.8f;
224 state->unk_24 = 90.0f;
225 state->vel = -(state->unk_18.x - state->unk_18.y);
226 state->bounceDivisor = fabsf(state->unk_18.x - state->unk_18.y) / 16.5;
227 state->unk_28 = 360 / state->moveTime;
228 state->curPos.x = actor->curPos.x;
229 state->curPos.y = actor->curPos.y;
230 state->curPos.z = actor->curPos.z;
231 script->functionTemp[0] = 3;
232 // fallthrough
233 case 3:
234 currentPosX64 = state->curPos.x; // required to match
235 state->curPos.x = currentPosX64 + state->bounceDivisor * sin_rad(DEG_TO_RAD(state->unk_24)) / 33.0;
236 state->curPos.y -= state->bounceDivisor * sin_rad(DEG_TO_RAD(state->unk_24));
237 state->unk_24 += state->unk_28;
238 state->unk_24 = clamp_angle(state->unk_24);
239 actor->curPos.x = state->curPos.x;
240 actor->curPos.y = state->curPos.y;
241 actor->curPos.z = state->curPos.z;
242
244 return ApiStatus_DONE2;
245 }
246
247 state->moveTime--;
248 if (state->moveTime == 0) {
249 return ApiStatus_DONE1;
250 }
251 break;
252 }
253
254 return ApiStatus_BLOCK;
255}
256
257API_CALLABLE(N(OnMissHeadbonk)) {
258 BattleStatus* battleStatus = &gBattleStatus;
260 Vec3f* pos = &partner->state.curPos;
261
262 if (isInitialCall) {
263 script->functionTemp[0] = 0;
264 }
265
266 if (script->functionTemp[0] == 0) {
267 partner->state.curPos.x = partner->curPos.x;
268 partner->state.curPos.y = partner->curPos.y;
269 partner->state.curPos.z = partner->curPos.z;
270 script->functionTemp[0] = 1;
271 }
272
273 if (partner->state.vel > 0.0f) {
275 }
276
277 if (partner->state.vel < 0.0f) {
279 }
280
281 partner->state.curPos.y = (partner->state.curPos.y + partner->state.vel);
282 partner->state.vel = (partner->state.vel - partner->state.acceleration);
283 add_xz_vec3f(pos, partner->state.speed, partner->state.angle);
284 partner->curPos.x = partner->state.curPos.x;
285 partner->curPos.y = partner->state.curPos.y;
286 partner->curPos.z = partner->state.curPos.z;
287
288 if (partner->curPos.y < 10.0f) {
289 partner->curPos.y = 10.0f;
290
291 play_movement_dust_effects(2, partner->curPos.x, partner->curPos.y, partner->curPos.z, partner->yaw);
293
294 return ApiStatus_DONE1;
295 }
296
297 return ApiStatus_BLOCK;
298}
299
300API_CALLABLE(N(GetTattleMessage)) {
301 BattleStatus* battleStatus = &gBattleStatus;
302 Actor* partner = battleStatus->partnerActor;
303 Actor* target = get_actor(partner->targetActorID);
304 s32* tattle = &bActorTattles[target->actorType];
305
306 script->varTable[0] = *tattle;
307
308 if (script->varTable[0] == NULL) {
309 script->varTable[0] = bActorTattles[0];
310 }
311
313
314 return ApiStatus_DONE2;
315}
316
317API_CALLABLE(N(GetTattleCamPos)) {
319 s32 xSize;
320
321 if (!(target->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
322 script->varTable[1] = script->varTable[1] + (((target->size.y / 3) & 0xFF) * target->scalingFactor);
323 script->varTable[1] += ((target->size.y / 4) * target->scalingFactor);
324 } else {
325 script->varTable[1] = script->varTable[1] - (((target->size.y / 3) & 0xFF) * target->scalingFactor);
326 script->varTable[1] -= ((target->size.y / 4) * target->scalingFactor);
327 }
328
329 if (target->flags & ACTOR_FLAG_HALF_HEIGHT) {
330 script->varTable[1] -= (target->size.y / 2) * target->scalingFactor;
331 }
332
333 xSize = target->size.y * target->scalingFactor;
334 if (xSize < target->size.x) {
335 xSize = target->size.x;
336 }
337
338 script->varTable[3] = xSize + 76;
339 script->varTable[0] += bActorOffsets[target->actorType].tattleCam.x;
340 script->varTable[1] += bActorOffsets[target->actorType].tattleCam.y;
341 script->varTable[3] += bActorOffsets[target->actorType].tattleCam.z;
342
343 return ApiStatus_DONE2;
344}
345
346API_CALLABLE(N(OpenTattleWindow)) {
347 N(TattleWindowEffect) = fx_tattle_window(0, 206, 144, 0, 1.0f, 0);
348
349 return ApiStatus_DONE2;
350}
351
352API_CALLABLE(N(CloseTattleWindow)) {
353 EffectInstance* effect = N(TattleWindowEffect);
354
355 effect->data.tattleWindow->pos.y = 144.0f;
357
358 return ApiStatus_DONE2;
359}
360
361API_CALLABLE(N(CanChargeMore)) {
362 BattleStatus* battleStatus = &gBattleStatus;
363 Actor* partner = battleStatus->partnerActor;
364
365 script->varTable[0] = FALSE;
366
367 switch (battleStatus->selectedMoveID) {
368 case MOVE_TATTLE:
369 if (partner->isGlowing >= 99) {
370 script->varTable[0] = TRUE;
371 }
372 break;
373 case MOVE_CHARGE:
374 if (partner->isGlowing >= 99) {
375 script->varTable[0] = TRUE;
376 }
377 break;
378 case MOVE_MULTIBONK:
379 if (partner->isGlowing >= 99) {
380 script->varTable[0] = TRUE;
381 }
382 break;
383 }
384
385 return ApiStatus_DONE2;
386}
387
388API_CALLABLE(N(ChargeAtPos)) {
389 Bytecode* args = script->ptrReadPos;
390 BattleStatus* battleStatus = &gBattleStatus;
391 Actor* partner = battleStatus->partnerActor;
392 s32 boostAmount;
393 s32 x, y, z;
394
395 N(isCharged) = FALSE;
396 if (partner->isGlowing > 0) {
397 N(isCharged) = TRUE;
398 }
399
400 boostAmount = 0;
401 switch (battleStatus->selectedMoveID) {
402 case MOVE_TATTLE:
403 partner->isGlowing += 2;
404 boostAmount = 1;
405 if (partner->isGlowing >= 99) {
406 partner->isGlowing = 99;
407 }
408 break;
409 case MOVE_CHARGE:
410 partner->isGlowing += 2;
411 boostAmount = 1;
412 if (partner->isGlowing >= 99) {
413 partner->isGlowing = 99;
414 }
415 break;
416 case MOVE_MULTIBONK:
417 partner->isGlowing += 2;
418 boostAmount = 1;
419 if (partner->isGlowing >= 99) {
420 partner->isGlowing = 99;
421 }
422 break;
423 }
424
425 x = evt_get_variable(script, *args++);
426 y = evt_get_variable(script, *args++);
427 z = evt_get_variable(script, *args++);
428 fx_stat_change(boostAmount, x, y, z, 1.0f, 60);
429
431 return ApiStatus_DONE2;
432}
433
434API_CALLABLE(N(StopCharge)) {
435 BattleStatus* battleStatus = &gBattleStatus;
436
437 battleStatus->partnerActor->isGlowing = 0;
438 battleStatus->flags1 &= ~BS_FLAGS1_GOOMBARIO_CHARGED;
439
440 return ApiStatus_DONE2;
441}
442
443API_CALLABLE(N(StopChargeAndGet)) {
445
447 partner->isGlowing = 0;
448 }
449
450 script->varTable[0] = partner->isGlowing;
451 partner->isGlowing = 0;
452 gBattleStatus.flags1 &= ~BS_FLAGS1_GOOMBARIO_CHARGED;
453
454 return ApiStatus_DONE2;
455}
456
457API_CALLABLE(N(GetChargeAmount)) {
458 BattleStatus* battleStatus = &gBattleStatus;
459
460 script->varTable[0] = battleStatus->partnerActor->isGlowing;
461
462 return ApiStatus_DONE2;
463}
464
465API_CALLABLE(N(PlayChargeFX)) {
466 Bytecode* args = script->ptrReadPos;
467 s32 var1 = evt_get_variable(script, *args++);
468 s32 var2 = evt_get_variable(script, *args++);
469 s32 var3 = evt_get_variable(script, *args++);
470 f32 var4 = evt_get_float_variable(script, *args++);
471
472 fx_energy_in_out(6, var1, var2, var3, var4, 45);
473
474 return ApiStatus_DONE2;
475}
476
477API_CALLABLE(N(GetChargeMessage)) {
478 if (!N(isCharged)) {
479 script->varTable[0] = BTL_MSG_CHARGE_GOOMBARIO;
480 } else {
481 script->varTable[0] = BTL_MSG_CHARGE_GOOMBARIO_MORE;
482 }
483
484 return ApiStatus_DONE2;
485}
486
487s32 N(DefaultAnims)[] = {
488 STATUS_KEY_NORMAL, ANIM_BattleGoombario_Walk,
489 STATUS_KEY_STONE, ANIM_BattleGoombario_Still,
490 STATUS_KEY_SLEEP, ANIM_BattleGoombario_CloseEyes,
491 STATUS_KEY_POISON, ANIM_BattleGoombario_Still,
492 STATUS_KEY_STOP, ANIM_BattleGoombario_Still,
493 STATUS_KEY_DAZE, ANIM_BattleGoombario_Injured,
494 STATUS_KEY_INACTIVE, ANIM_BattleGoombario_Still,
496};
497
498s32 N(DefenseTable)[] = {
501};
502
503s32 N(StatusTable)[] = {
506 STATUS_KEY_SLEEP, 100,
509 STATUS_KEY_DIZZY, 100,
510 STATUS_KEY_FEAR, 100,
514 STATUS_KEY_STOP, 100,
526};
527
528ActorPartBlueprint N(ActorParts)[] = {
529 {
530 .flags = 0,
531 .index = PRT_MAIN,
532 .posOffset = { 0, 0, 0 },
533 .targetOffset = { 8, 22 },
534 .opacity = 255,
535 .idleAnimations = N(DefaultAnims),
536 .defenseTable = N(DefenseTable),
537 .eventFlags = ACTOR_EVENT_FLAGS_NONE,
538 .elementImmunityFlags = 0,
539 },
540};
541
542ActorBlueprint NAMESPACE = {
543 .flags = 0,
544 .type = ACTOR_TYPE_GOOMBARIO,
545 .level = ACTOR_LEVEL_GOOMBARIO,
546 .maxHP = 99,
547 .partCount = ARRAY_COUNT(N(ActorParts)),
548 .partsData = N(ActorParts),
549 .initScript = &N(EVS_Init),
550 .statusTable = N(StatusTable),
551 .escapeChance = 0,
552 .airLiftChance = 0,
553 .hurricaneChance = 0,
554 .spookChance = 0,
555 .upAndAwayChance = 0,
556 .spinSmashReq = 4,
557 .powerBounceChance = 80,
558 .coinReward = 0,
559 .size = { 29, 26 },
560 .healthBarOffset = { 0, 0 },
561 .statusIconOffset = { -10, 20 },
562 .statusTextOffset = { 10, 20 },
563};
564
565EvtScript N(EVS_Init) = {
566 Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn)))
567 Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle)))
568 Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent)))
569 Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase)))
570 Return
571 End
572};
573
574EvtScript N(EVS_Idle) = {
575 Return
576 End
577};
578
579EvtScript N(EVS_HandleEvent) = {
580 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
581 Call(CloseActionCommandInfo)
582 Call(GetLastEvent, ACTOR_PARTNER, LVar0)
586 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
587 SetConst(LVar2, ANIM_BattleGoombario_HurtStill)
589 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
594 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
595 SetConst(LVar0, PRT_MAIN)
596 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
600 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
601 Set(LVar2, 12)
603 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
606 SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1)
607 Set(LVar2, 12)
608 SetConst(LVar3, ANIM_BattleGoombario_BurnHurt2)
610 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
613 SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1)
614 SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2)
616 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
619 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
620 Set(LVar2, 12)
623 Call(N(StopCharge))
624 SetConst(LVar1, ANIM_BattleGoombario_HurtStill)
627 SetConst(LVar0, PRT_MAIN)
628 SetConst(LVar1, ANIM_BattleGoombario_Idle)
629 SetConst(LVar2, ANIM_BattleGoombario_Run)
630 Set(LVar3, 0)
634 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE)
635 SetConst(LVar0, PRT_MAIN)
636 SetConst(LVar1, ANIM_BattleGoombario_Block)
638 Wait(10)
642 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
643 Return
644 End
645};
646
647EvtScript N(EVS_TakeTurn) = {
648 Call(GetBattlePhase, LVar0)
651 ExecWait(N(EVS_FirstStrike))
653 ExecWait(N(EVS_ExecuteAction))
655 ExecWait(N(EVS_Celebrate))
657 ExecWait(N(EVS_RunAway))
661 Return
662 End
663};
664
665EvtScript N(EVS_Celebrate) = {
666 SetConst(LVar0, PRT_MAIN)
667 SetConst(LVar1, ANIM_BattleGoombario_CelebrateLoop)
668 SetConst(LVar2, ANIM_BattleGoombario_Celebrate)
669 SetConst(LVar3, ANIM_BattleGoombario_Idle)
671 Return
672 End
673};
674
675EvtScript N(EVS_ExecuteAction) = {
676 Call(GetMenuSelection, LVar0, LVar1, LVar2)
677 Call(ShowActionHud, TRUE)
678 Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
681 Call(LoadStarPowerScript)
683 Return
685 Call(LoadItemScript)
687 Return
690 CaseEq(MOVE_HEADBONK1)
691 ExecWait(N(EVS_Attack_Headbonk1))
692 CaseEq(MOVE_HEADBONK2)
693 ExecWait(N(EVS_Attack_Headbonk2))
694 CaseEq(MOVE_HEADBONK3)
695 ExecWait(N(EVS_Attack_Headbonk3))
696 CaseEq(MOVE_TATTLE)
697 ExecWait(N(EVS_Move_Tattle))
698 CaseEq(MOVE_CHARGE)
699 ExecWait(N(EVS_Move_Charge))
700 CaseEq(MOVE_MULTIBONK)
701 ExecWait(N(EVS_Move_Multibonk))
703 Return
704 End
705};
706
707EvtScript N(EVS_FirstStrike) = {
708 Return
709 End
710};
711
712EvtScript N(EVS_RunAway) = {
713 SetConst(LVar0, PRT_MAIN)
714 SetConst(LVar1, ANIM_BattleGoombario_Run)
716 Return
717 End
718};
719
721 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
722 Call(SetGoalToHome, ACTOR_PARTNER)
723 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
724 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
725 Call(SetActorYaw, ACTOR_PARTNER, 0)
726 Call(RunToGoal, ACTOR_PARTNER, 0)
727 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
728 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
729 Return
730 End
731};
732
733EvtScript N(EVS_HandlePhase) = {
734 Call(GetBattlePhase, LVar0)
738 Call(UseIdleAnimation, ACTOR_PARTNER, FALSE)
739 Call(UseBattleCamPreset, BTL_CAM_ACTOR)
740 Call(BattleCamTargetActor, ACTOR_SELF)
741 Call(MoveBattleCamOver, 20)
742 Wait(10)
743 Call(SetActorYaw, ACTOR_PLAYER, 30)
744 Wait(1)
745 Call(SetActorYaw, ACTOR_PLAYER, 60)
746 Wait(1)
747 Call(SetActorYaw, ACTOR_PLAYER, 90)
748 Wait(1)
749 Call(SetActorYaw, ACTOR_PLAYER, 120)
750 Wait(1)
751 Call(SetActorYaw, ACTOR_PLAYER, 150)
752 Wait(1)
753 Call(SetActorYaw, ACTOR_PLAYER, 180)
754 Wait(5)
755 Call(ActorSpeak, MSG_CH0_00BA, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle)
756 Call(SetActorYaw, ACTOR_PLAYER, 150)
757 Wait(1)
758 Call(SetActorYaw, ACTOR_PLAYER, 120)
759 Wait(1)
760 Call(SetActorYaw, ACTOR_PLAYER, 90)
761 Wait(1)
762 Call(SetActorYaw, ACTOR_PLAYER, 60)
763 Wait(1)
764 Call(SetActorYaw, ACTOR_PLAYER, 30)
765 Wait(1)
766 Call(SetActorYaw, ACTOR_PLAYER, 0)
767 Wait(5)
769 Call(UseIdleAnimation, ACTOR_PARTNER, TRUE)
770 EndIf
772 Return
773 End
774};
775
776EvtScript N(EVS_ReturnHome_Miss) = {
777 Call(PartnerYieldTurn)
778 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MISTAKE)
779 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
780 Thread
781 Wait(4)
782 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
783 Set(LVar0, 180)
784 Loop(3)
785 Add(LVar0, 60)
786 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
787 Wait(1)
788 EndLoop
789 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
790 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
792 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
793 Sub(LVar0, 30)
794 Set(LVar1, 0)
795 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
796 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.2))
797 Call(N(GetReturnMoveTime))
798 Call(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE)
799 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
800 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
801 Wait(1)
802 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
803 Wait(1)
804 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
805 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
806 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
807 Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0)
808 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE)
809 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
810 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
811 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
812 Wait(1)
813 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
814 Wait(1)
815 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle)
816 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
817 Wait(2)
818 Call(SetGoalToHome, ACTOR_PARTNER)
819 Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0))
820 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
821 Call(RunToGoal, ACTOR_PARTNER, 0)
822 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
823 Return
824 End
825};
826
827EvtScript N(EVS_ReturnHome_Success) = {
828 Call(PartnerYieldTurn)
829 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
830 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
831 Call(SetGoalToHome, ACTOR_PARTNER)
832 Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
833 Add(LVar0, 60)
834 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
835 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
836 Call(N(GetReturnMoveTime))
837 Thread
838 Wait(4)
839 Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0)
840 Sub(LVar0, 4)
841 Set(LVar1, LVar0)
842 Div(LVar1, 3)
843 IfLt(LVar1, 1)
844 Set(LVar1, 1)
845 EndIf
846 Set(LVar2, LVar1)
847 Mod(LVar2, 2)
848 IfEq(LVar2, 0)
849 Sub(LVar1, 1)
850 EndIf
851 Set(LVar0, 180)
852 Loop(LVar1)
853 Loop(3)
854 Add(LVar0, 60)
855 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
856 Wait(1)
857 EndLoop
858 EndLoop
859 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
860 Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0)
862 Call(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE)
863 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
864 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
865 Wait(1)
866 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
867 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
868 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
869 Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0)
870 Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE)
871 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
872 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
873 Wait(1)
874 Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0)
875 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
876 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
877 Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE)
878 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
879 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
880 Wait(1)
881 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
882 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
883 Wait(2)
884 Call(SetGoalToHome, ACTOR_PARTNER)
885 Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0))
886 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
887 Call(RunToGoal, ACTOR_PARTNER, 0)
888 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
889 Return
890 End
891};
892
893EvtScript N(runToTarget) = {
894 Call(SetGoalToFirstTarget, ACTOR_SELF)
895 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
896 Sub(LVar0, 40)
897 Call(InitTargetIterator)
898 Call(SetGoalToTarget, ACTOR_PARTNER)
899 Call(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
900 Sub(LVar3, Float(70.0))
902 Set(LVar3, LVar0)
903 EndIf
904 Call(SetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5)
905 Call(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH)
906 Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0))
907 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
908 Call(RunToGoal, ACTOR_PARTNER, 0)
909 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
910 Return
911 End
912};
913
914EvtScript N(calcJumpTime) = {
915 Call(SetGoalToTarget, ACTOR_PARTNER)
916 Call(GetGoalPos, ACTOR_PARTNER, LVarB, LVar7, LVarD)
917 Call(GetActorPos, ACTOR_PARTNER, LVar7, LVarD, LVarE)
919 Sub(LVarB, LVar7)
920 Else
921 Sub(LVar7, LVarB)
922 Set(LVarB, LVar7)
923 EndIf
924 Sub(LVarB, 20)
925 DivF(LVarB, Float(10.588))
926 AddF(LVarB, 15)
927 Set(LVarA, LVarB)
928 Return
929 End
930};
931
932EvtScript N(EVS_Attack_Headbonk1) = {
933 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
934 Call(action_command_jump_init)
935 ExecWait(N(runToTarget))
936 ExecWait(N(calcJumpTime))
937 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
938 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
939 Wait(5)
940 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
941 Wait(1)
942 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
943 Call(action_command_jump_start, LVarA, 3)
944 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
945 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
946 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
947 Call(SetGoalToTarget, ACTOR_PARTNER)
948 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
949 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP)
950 Call(N(JumpOnTarget), LVarA, 0)
953 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
954 Call(N(OnMissHeadbonk))
955 Thread
956 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
958 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP)
959 Wait(20)
960 ExecWait(N(EVS_ReturnHome_Miss))
961 Return
962 EndIf
964 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
965 Wait(1)
966 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
967 Wait(1)
968 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
970 Wait(1)
971 Call(GetPartnerActionSuccess, LVar0)
973 CaseGt(0)
974 Call(N(GetChargeAmount))
975 Add(LVar0, 1)
978 Call(N(StopChargeAndGet))
979 Add(LVar0, 1)
982 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
986 ExecWait(N(EVS_ReturnHome_Miss))
987 Return
993 Thread
994 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1)
995 Wait(5)
996 Call(SetGoalToTarget, ACTOR_PARTNER)
997 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2)
999 Call(GetActionResult, LVarF)
1000 Call(CloseActionCommandInfo)
1001 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1002 Call(action_command_jump_init)
1003 Call(ShowActionHud, FALSE)
1004 Call(action_command_jump_start, 24, 3)
1005 Set(LVarA, 24)
1006 Thread
1007 Wait(4)
1008 Set(LVar0, 0)
1009 Loop(6)
1010 Add(LVar0, -30)
1011 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1012 Wait(1)
1013 EndLoop
1014 EndThread
1015 Call(SetGoalToTarget, ACTOR_PARTNER)
1016 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1017 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK)
1018 Call(N(JumpOnTarget), LVarA, 3)
1020 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1021 Wait(1)
1022 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1023 Wait(1)
1024 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1026 Wait(1)
1027 Call(N(StopChargeAndGet))
1028 Add(LVar0, 1)
1029 Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS)
1030 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1031 Call(SetActionResult, LVarF)
1032 ExecWait(N(EVS_ReturnHome_Success))
1033 Return
1034 End
1035};
1036
1037EvtScript N(EVS_Attack_Headbonk2) = {
1038 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1039 Call(action_command_jump_init)
1040 ExecWait(N(runToTarget))
1041 ExecWait(N(calcJumpTime))
1042 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
1043 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
1044 Wait(5)
1045 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
1046 Wait(1)
1047 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1048 Call(action_command_jump_start, LVarA, 3)
1049 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1050 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
1051 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
1052 Call(SetGoalToTarget, ACTOR_PARTNER)
1053 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1054 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP)
1055 Call(N(JumpOnTarget), LVarA, 0)
1058 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1059 Call(N(OnMissHeadbonk))
1060 Thread
1061 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
1062 EndThread
1063 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP)
1064 Wait(20)
1065 ExecWait(N(EVS_ReturnHome_Miss))
1066 Return
1067 EndIf
1069 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1070 Wait(1)
1071 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1072 Wait(1)
1073 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1075 Wait(1)
1076 Call(GetPartnerActionSuccess, LVar0)
1077 Switch(LVar0)
1078 CaseGt(0)
1079 Call(N(GetChargeAmount))
1080 Add(LVar0, 2)
1083 Call(N(StopChargeAndGet))
1084 Add(LVar0, 2)
1086 EndSwitch
1087 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1088 Switch(LVar0)
1091 ExecWait(N(EVS_ReturnHome_Miss))
1092 Return
1097 EndSwitch
1098 Thread
1099 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1)
1100 Wait(5)
1101 Call(SetGoalToTarget, ACTOR_PARTNER)
1102 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2)
1103 EndThread
1104 Call(GetActionResult, LVarF)
1105 Call(CloseActionCommandInfo)
1106 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1107 Call(action_command_jump_init)
1108 Call(ShowActionHud, FALSE)
1109 Call(action_command_jump_start, 24, 3)
1110 Set(LVarA, 24)
1111 Thread
1112 Wait(4)
1113 Set(LVar0, 0)
1114 Loop(6)
1115 Add(LVar0, -30)
1116 Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0)
1117 Wait(1)
1118 EndLoop
1119 EndThread
1120 Call(SetGoalToTarget, ACTOR_PARTNER)
1121 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE)
1122 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1123 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK)
1124 Call(N(JumpOnTarget), LVarA, 3)
1125 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET)
1127 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1128 Wait(1)
1129 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1130 Wait(1)
1131 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1133 Wait(1)
1134 Call(N(StopChargeAndGet))
1135 Add(LVar0, 2)
1136 Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS)
1137 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1138 Call(SetActionResult, LVarF)
1139 ExecWait(N(EVS_ReturnHome_Success))
1140 Return
1141 End
1142};
1143
1144EvtScript N(EVS_Attack_Headbonk3) = {
1145 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1146 Call(action_command_jump_init)
1147 ExecWait(N(runToTarget))
1148 ExecWait(N(calcJumpTime))
1149 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
1150 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
1151 Wait(5)
1152 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
1153 Wait(1)
1154 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1155 Call(action_command_jump_start, LVarA, 3)
1156 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1157 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
1158 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
1159 Call(SetGoalToTarget, ACTOR_PARTNER)
1160 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1161 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP)
1162 Call(N(JumpOnTarget), LVarA, 0)
1165 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1166 Call(N(OnMissHeadbonk))
1167 Thread
1168 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
1169 EndThread
1170 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP)
1171 Wait(20)
1172 ExecWait(N(EVS_ReturnHome_Miss))
1173 Return
1174 EndIf
1176 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1177 Wait(1)
1178 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1179 Wait(1)
1180 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1182 Wait(1)
1183 Call(GetPartnerActionSuccess, LVar0)
1184 Switch(LVar0)
1185 CaseGt(0)
1186 Call(N(GetChargeAmount))
1187 Add(LVar0, 3)
1190 Call(N(StopChargeAndGet))
1191 Add(LVar0, 3)
1193 EndSwitch
1194 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1195 Switch(LVar0)
1198 ExecWait(N(EVS_ReturnHome_Miss))
1199 Return
1204 EndSwitch
1205 Thread
1206 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1)
1207 Wait(5)
1208 Call(SetGoalToTarget, ACTOR_PARTNER)
1209 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2)
1210 EndThread
1211 Call(GetActionResult, LVarF)
1212 Call(CloseActionCommandInfo)
1213 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1214 Call(action_command_jump_init)
1215 Call(ShowActionHud, FALSE)
1216 Call(action_command_jump_start, 24, 3)
1217 Set(LVarA, 24)
1218 Thread
1219 Wait(4)
1220 Set(LVar0, 0)
1221 Loop(6)
1222 Add(LVar0, -30)
1223 Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0)
1224 Wait(1)
1225 EndLoop
1226 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
1227 EndThread
1228 Thread
1229 Set(LVar0, 0)
1230 Loop(LVarA)
1231 Add(LVar0, 133)
1232 Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG)
1233 Wait(1)
1234 EndLoop
1235 EndThread
1236 Call(SetGoalToTarget, ACTOR_PARTNER)
1237 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE)
1238 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1239 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK)
1240 Call(N(JumpOnTarget), LVarA, 3)
1241 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET)
1243 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1244 Wait(1)
1245 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1246 Wait(1)
1247 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1249 Wait(1)
1250 Call(N(StopChargeAndGet))
1251 Add(LVar0, 3)
1252 Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS)
1253 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1254 Call(SetActionResult, LVarF)
1255 ExecWait(N(EVS_ReturnHome_Success))
1256 Return
1257 End
1258};
1259
1260s32 N(actionCommandTable)[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
1261
1262s32 N(MultibonkChance) = 200;
1263
1264EvtScript N(EVS_Move_Multibonk) = {
1265 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1266 Call(action_command_jump_init)
1267 ExecWait(N(runToTarget))
1268 ExecWait(N(calcJumpTime))
1269 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk)
1270 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0)
1271 Wait(5)
1272 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
1273 Wait(1)
1274 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1275 Call(action_command_jump_start, LVarA, 1)
1276 Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR)
1277 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
1278 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
1279 Call(SetGoalToTarget, ACTOR_PARTNER)
1280 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1281 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP)
1282 Call(N(JumpOnTarget), LVarA, 0)
1285 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1286 Call(N(OnMissHeadbonk))
1287 Thread
1288 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
1289 EndThread
1290 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP)
1291 Wait(20)
1292 ExecWait(N(EVS_ReturnHome_Miss))
1293 Return
1294 EndIf
1296 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1297 Wait(1)
1298 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1299 Wait(1)
1300 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1302 Wait(1)
1303 Call(GetPartnerActionSuccess, LVar0)
1304 Switch(LVar0)
1305 CaseGt(0)
1306 Call(N(GetChargeAmount))
1307 Add(LVar0, 3)
1310 Call(N(StopChargeAndGet))
1311 Add(LVar0, 3)
1313 EndSwitch
1314 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1315 Switch(LVar0)
1318 ExecWait(N(EVS_ReturnHome_Miss))
1319 Return
1324 EndSwitch
1325 Thread
1326 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1)
1327 Wait(5)
1328 Call(SetGoalToTarget, ACTOR_PARTNER)
1329 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2)
1330 EndThread
1331 Call(GetActionResult, LVarF)
1332 Set(LVarD, 0)
1333 Set(LVarF, 0)
1334 Set(LFlag0, FALSE)
1335 Label(10)
1336 Thread
1337 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1)
1338 Wait(5)
1339 Call(SetGoalToTarget, ACTOR_PARTNER)
1340 Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2)
1341 EndThread
1342 Call(CloseActionCommandInfo)
1343 Call(SetActionDifficultyTable, Ref(N(actionCommandTable)))
1344 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
1345 Call(action_command_jump_init)
1346 Set(LVarA, 24)
1347 Switch(LVarF)
1348 CaseEq(0)
1349 Call(action_command_jump_start, LVarA, 1)
1350 CaseEq(1)
1351 Call(action_command_jump_start, LVarA, 2)
1352 CaseEq(2)
1353 Call(action_command_jump_start, LVarA, 3)
1354 CaseEq(3)
1355 Call(action_command_jump_start, LVarA, 4)
1357 Call(action_command_jump_start, LVarA, 5)
1358 EndSwitch
1359 Thread
1360 Wait(4)
1361 Set(LVar0, 0)
1362 Loop(6)
1363 Add(LVar0, -30)
1364 Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0)
1365 Wait(1)
1366 EndLoop
1367 Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk)
1368 EndThread
1369 Thread
1370 Set(LVar0, 0)
1371 Loop(LVarA)
1372 Add(LVar0, 133)
1373 Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG)
1374 Wait(1)
1375 EndLoop
1376 EndThread
1377 Call(SetGoalToTarget, ACTOR_PARTNER)
1378 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE)
1379 Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk)
1380 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK)
1381 Call(N(JumpOnTarget), LVarA, 3)
1382 Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET)
1383 Sub(LVarD, 1)
1384 Call(N(AdjustMultibonkChance))
1385 IfGe(LVarF, LVar0)
1386 Set(LFlag0, TRUE)
1387 EndIf
1389 Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0))
1390 Wait(1)
1391 Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0))
1392 Wait(1)
1393 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1395 Wait(1)
1396 Call(GetPartnerActionSuccess, LVar0)
1397 Switch(LVar0)
1398 CaseGt(0)
1399 IfEq(LFlag0, FALSE)
1400 Call(N(GetChargeAmount))
1401 Add(LVar0, 3)
1403 Else
1404 Call(N(StopChargeAndGet))
1405 Add(LVar0, 3)
1407 EndIf
1409 Call(N(StopChargeAndGet))
1410 Add(LVar0, 3)
1412 Set(LFlag0, FALSE)
1413 EndSwitch
1414 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE)
1415 Call(SetActionResult, LVarE)
1416 Switch(LVar0)
1419 ExecWait(N(EVS_ReturnHome_Miss))
1420 Return
1424 IfEq(LFlag0, TRUE)
1425 ExecWait(N(EVS_ReturnHome_Success))
1426 Return
1427 EndIf
1429 EndSwitch
1430 Add(LVarF, 1)
1431 Goto(10)
1432 Return
1433 End
1434};
1435
1436EvtScript N(EVS_Move_Tattle) = {
1437 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1438 Add(LVar0, 30)
1439 Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0))
1440 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
1441 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1442 Call(RunToGoal, ACTOR_PARTNER, 0, FALSE)
1443 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
1444 Call(InitTargetIterator)
1445 Call(SetGoalToTarget, ACTOR_PARTNER)
1446 Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE)
1447 Call(N(OpenTattleWindow))
1448 Wait(12)
1452 Call(SetCamViewport, CAM_TATTLE, 137, 95, 138, 99)
1453 Call(GetOwnerTarget, LVarA, LVarB)
1454 Call(GetActorPos, LVarA, LVar0, LVar1, LVar2)
1455 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1456 Call(N(GetTattleCamPos))
1457 Wait(1)
1459 Call(SetNoInterpCamParams, CAM_TATTLE, FALSE, LVar3, 100, 4)
1460 Wait(2)
1461 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TATTLE_WINDOW_OPEN)
1463 Wait(10)
1464 Call(N(GetTattleMessage))
1465 Call(ActorSpeak, LVar0, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle)
1466 Call(N(CloseTattleWindow))
1467 Wait(12)
1469 Wait(32)
1470 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1471 Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE)
1472 Call(PartnerYieldTurn)
1473 Call(SetGoalToHome, ACTOR_PARTNER)
1474 Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0))
1475 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.8))
1476 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run)
1477 Call(RunToGoal, ACTOR_PARTNER, 0)
1478 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
1479 Return
1480 End
1481};
1482
1483EvtScript N(EVS_Move_Charge) = {
1484 Call(UseBattleCamPreset, BTL_CAM_PARTNER_GOOMPA)
1485 Wait(10)
1486 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_PreHeadbonk)
1487 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
1488 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1489 Add(LVar1, 15)
1490 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_CHARGE_UP)
1491 Call(N(PlayChargeFX), LVar0, LVar1, LVar2, Float(1.2))
1492 Wait(3)
1493 Call(N(PlayChargeFX), LVar0, LVar1, LVar2, Float(0.8))
1494 Thread
1495 Wait(15)
1496 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1497 Add(LVar1, 15)
1498 Add(LVar2, -5)
1499 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_GATHERING)
1500 PlayEffect(EFFECT_ENERGY_ORB_WAVE, 9, LVar0, LVar1, LVar2, Float(2.0), 20, 0)
1501 EndThread
1502 Wait(30)
1503 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
1504 Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0)
1505 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
1506 Call(MoveBattleCamOver, 10)
1507 Call(N(CanChargeMore))
1508 IfEq(LVar0, 0)
1509 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1510 Add(LVar0, 10)
1511 Add(LVar1, 25)
1512 Add(LVar2, 5)
1513 Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW)
1514 Call(N(ChargeAtPos), LVar0, LVar1, LVar2)
1515 Wait(4)
1516 Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4))
1517 Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1518 Call(SetJumpAnimations, ACTOR_PARTNER, ANIM_BattleGoombario_Jump, 0x00000001, ANIM_BattleGoombario_Jump, ANIM_BattleGoombario_Jump)
1519 Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
1520 Call(JumpToGoal, ACTOR_PARTNER, 20, TRUE, TRUE, FALSE)
1521 Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle)
1522 Call(GetMenuSelection, LVar0, LVar1, LVar2)
1523 Switch(LVar2)
1524 CaseEq(MOVE_TATTLE)
1525 Call(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60)
1526 CaseEq(MOVE_CHARGE)
1527 Call(N(GetChargeMessage))
1528 Call(ShowMessageBox, LVar0, 60)
1529 CaseEq(MOVE_MULTIBONK)
1530 Call(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60)
1531 EndSwitch
1532 Else
1533 Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60)
1534 EndIf
1535 Label(0)
1536 Wait(1)
1537 Call(IsMessageBoxDisplayed, LVar0)
1538 IfEq(LVar0, 1)
1539 Goto(0)
1540 EndIf
1541 Return
1542 End
1543};
@ ACTION_COMMAND_MODE_NOT_LEARNED
Definition action_cmd.h:38
s32 bActorTattles[]
struct ActorBlueprint * actorBlueprint
f32 scalingFactor
ActorState state
s16 targetActorID
s32 b32
Vec2bu size
Vec3f curPos
Bytecode EvtScript[]
Vec3s pos
Definition demo_api.c:17
#define rand_int
#define clamp_angle
#define atan2
struct TattleWindowFXData * tattleWindow
Definition effects.h:2572
EffectData data
Definition effects.h:2605
@ FX_INSTANCE_FLAG_DISMISS
Definition enums.h:3517
@ ACTION_COMMAND_JUMP
Definition enums.h:3473
@ BS_FLAGS1_GOOMBARIO_CHARGED
Definition enums.h:3599
@ BS_FLAGS1_TATTLE_OPEN
Definition enums.h:3567
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3576
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ BS_FLAGS1_2000
Definition enums.h:3582
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3571
@ BS_FLAGS1_4000
Definition enums.h:3583
@ BTL_MSG_CHARGE_GOOMBARIO_MORE
Definition enums.h:4095
@ BTL_MSG_CANT_CHARGE
Definition enums.h:4066
@ BTL_MSG_CHARGE_GOOMBARIO
Definition enums.h:4094
@ ELEMENT_END
Definition enums.h:2114
@ ELEMENT_NORMAL
Definition enums.h:2115
@ 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_PLAYER_BEGIN
Definition enums.h:2066
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2064
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ BTL_MENU_TYPE_STAR_POWERS
Definition enums.h:4235
@ BTL_MENU_TYPE_ITEMS
Definition enums.h:4229
@ CAM_UPDATE_NO_INTERP
Definition enums.h:4761
@ 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_GOOMBARIO_BONK_FOLLOWUP_2
Definition enums.h:4875
@ BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_1
Definition enums.h:4872
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_PARTNER_MIDAIR
Definition enums.h:4874
@ BTL_CAM_ACTOR
Definition enums.h:4836
@ BTL_CAM_PARTNER_GOOMPA
Definition enums.h:4877
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ BTL_CAM_PARTNER_MISTAKE
Definition enums.h:4873
@ BTL_CAM_PARTNER_APPROACH
Definition enums.h:4869
@ SUPPRESS_EVENT_SPIKY_FRONT
Definition enums.h:2902
@ SUPPRESS_EVENT_BURN_CONTACT
Definition enums.h:2904
@ SOUND_GOOMBARIO_HEADBONK
Definition enums.h:993
@ SOUND_LAND_SOFTLY
Definition enums.h:765
@ SOUND_GOOMBARIO_GATHERING
Definition enums.h:1314
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ SOUND_GROW
Definition enums.h:1435
@ SOUND_TATTLE_WINDOW_OPEN
Definition enums.h:994
@ SOUND_NONE
Definition enums.h:547
@ SOUND_GOOMBARIO_JUMP
Definition enums.h:1322
@ SOUND_TRIP
Definition enums.h:784
@ SOUND_CHARGE_UP
Definition enums.h:1436
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_HALF_HEIGHT
Definition enums.h:3335
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
Definition enums.h:3331
@ ACTOR_BLUR_RESET
Definition enums.h:6415
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
@ 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_TATTLE
Definition enums.h:1802
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_POWER_BOUNCE
Definition enums.h:2870
@ DAMAGE_TYPE_JUMP
Definition enums.h:2858
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
#define ApiStatus_DONE1
Definition evt.h:117
#define ApiStatus_BLOCK
Definition evt.h:116
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
f32 fabsf(f32 f)
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
Definition 43F0.c:677
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:670
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
Definition 190B20.c:1139
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Definition 190B20.c:1005
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
Definition 190B20.c:1166
f32 evt_get_float_variable(Evt *script, Bytecode var)
Definition evt.c:1930
f32 sin_rad(f32 x)
Definition 43F0.c:713
void save_tattle_flags(s32)
Definition 181810.c:535
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_RunAwayFail
EvtScript EVS_Partner_SpikeContact
EvtScript EVS_Partner_RunAway
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
@ GF_Tutorial_SwapTurnOrder
ApiStatus SetCamEnabled(Evt *script, b32 isInitialCall)
ApiStatus SetCamViewport(Evt *script, b32 isInitialCall)
ApiStatus SetCamLookTarget(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus SetNoInterpCamParams(Evt *script, b32 isInitialCall)
ApiStatus SetCamNoDraw(Evt *script, b32 isInitialCall)
ApiStatus SetCamPerspective(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 DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#define IfGe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR >= RVAR.
Definition macros.h:284
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:383
#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 End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Mod(VAR, INT_VALUE)
Definition macros.h:380
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define IfFalse(b)
Definition macros.h:646
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:275
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define Div(VAR, INT_VALUE)
Definition macros.h:379
#define LVar2
Definition macros.h:150
#define DEG_TO_RAD(deg)
Definition macros.h:134
#define EVT_IGNORE_ARG
Definition macros.h:46
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define PI_S
Definition macros.h:129
#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 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 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
ActorOffsets bActorOffsets[]
Vec3b tattleCam
Definition battle.h:245
u8 powerBounceChance
Definition battle.h:146
struct Actor * partnerActor
BattleStatus gBattleStatus
Definition battle.c:11