Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
earthquake_jump.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
4#include "effects.h"
5#include "sprite/player.h"
6
7#define NAMESPACE battle_move_earthquake_jump
8
10
11API_CALLABLE(N(func_802A10E4_785C04)) {
12 script->varTable[0] = 3;
13 return ApiStatus_DONE2;
14}
15
16s32 N(DifficultyTable)[] = {
17 11, 10, 9, 8, 7, 6, 5, 4
18};
19
20extern EvtScript N(EVS_UseMove_Normal);
21extern EvtScript N(EVS_UseMove_Super);
22extern EvtScript N(EVS_UseMove_Ultra);
23
24EvtScript N(EVS_UseMove) = {
25 Set(LFlagA, FALSE)
26 Call(ShowActionHud, TRUE)
27 Call(GetMenuSelection, LVar0, LVar1, LVar2)
29 CaseEq(0)
30 ExecWait(N(EVS_UseMove_Normal))
31 CaseEq(1)
32 ExecWait(N(EVS_UseMove_Super))
33 CaseEq(2)
34 ExecWait(N(EVS_UseMove_Ultra))
36 Return
37 End
38};
39
40EvtScript N(EVS_UseMove_Normal) = {
41 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
42 Call(action_command_jump_init)
43 Call(SetGoalToFirstTarget, ACTOR_SELF)
44 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
45 Sub(LVar0, 20)
46 Call(InitTargetIterator)
47 Call(SetGoalToTarget, ACTOR_PLAYER)
48 Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
49 Sub(LVar3, Float(70.0))
51 Sub(LVar0, 20)
53 EndIf
54 Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
55 Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0)
56 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH)
57 Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0))
58 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
59 Call(CancelablePlayerRunToGoal, 0, LVar0)
60 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
61 Call(SetGoalToTarget, ACTOR_PLAYER)
62 Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0)
63 ExecWait(N(EVS_JumpSupport_CalcJumpTime))
65 Add(LVarB, 2)
66 Call(action_command_jump_start, LVarB, 3)
67 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_MIDAIR)
68 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
69 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp)
70 Call(PlayerBasicJumpToGoal, LVarA, PLAYER_BASIC_JUMP_0)
72 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
73 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
74 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
75 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
76 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
77 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
78 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
79 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
82 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
83 Add(LVar0, 24)
84 Add(LVar1, 10)
85 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
86 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
88 Wait(10)
89 Call(InitTargetIterator)
90 Call(GetPlayerActionSuccess, LVarB)
91 Set(LVar9, 0)
92 Label(1)
93 Call(SetGoalToTarget, ACTOR_PLAYER)
96 Goto(2)
97 EndIf
99 CaseGt(FALSE)
106 Label(2)
107 Call(ChooseNextTarget, ITER_NEXT, LVar0)
108 Add(LVar9, 1)
109 Call(GetTargetListLength, LVar0)
111 Goto(1)
112 EndIf
116 ExecWait(N(EVS_JumpSupport_NoFollowUp))
117 Return
124 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH)
125 Wait(5)
126 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
127 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
129 Call(GetActionResult, LVarE)
130 Set(LVarF, 0)
131 Set(LFlag0, FALSE)
132 Label(10)
134 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH)
135 Wait(5)
136 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
137 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
139 Call(CloseActionCommandInfo)
140 Call(SetActionDifficultyTable, Ref(N(DifficultyTable)))
141 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
142 Call(action_command_jump_init)
143 Set(LVarA, 26)
145 CaseEq(0)
146 Call(action_command_jump_start, LVarA, 3)
147 CaseEq(1)
148 Call(action_command_jump_start, LVarA, 3)
149 CaseEq(2)
150 Call(action_command_jump_start, LVarA, 4)
151 CaseEq(3)
152 Call(action_command_jump_start, LVarA, 4)
154 Call(action_command_jump_start, LVarA, 5)
156 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall)
157 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
158 IfEq(LVarF, 0)
159 Call(PlayerBasicJumpToGoal, 24, PLAYER_BASIC_JUMP_3)
160 Else
161 Call(PlayerBasicJumpToGoal, 24, PLAYER_BASIC_JUMP_4)
162 EndIf
164 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
165 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
166 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
167 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
168 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
169 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
170 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
171 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
174 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
175 Add(LVar0, 24)
176 Add(LVar1, 10)
177 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
178 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
180 Wait(10)
181 Call(GetCommandAutoSuccess, LVar1)
182 IfEq(LVar1, 1)
183 IfGt(LVarF, 3)
184 Set(LFlag0, TRUE)
185 EndIf
186 EndIf
187 Set(LVar0, 3)
188 Call(N(func_802A10E4_785C04))
190 Set(LFlag0, TRUE)
191 EndIf
192 Call(InitTargetIterator)
193 Call(GetPlayerActionSuccess, LVarB)
194 Set(LVar9, 0)
195 Label(11)
196 Call(SetGoalToTarget, ACTOR_PLAYER)
199 Goto(12)
200 EndIf
202 CaseGt(FALSE)
203 IfEq(LFlag0, FALSE)
206 Else
209 EndIf
215 CaseEq(0)
216 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1)
217 CaseEq(1)
218 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2)
219 CaseEq(2)
220 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3)
221 CaseEq(3)
222 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
224 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
226 Call(SetActionResult, LVarE)
227 Label(12)
228 Call(ChooseNextTarget, ITER_NEXT, LVar0)
229 Add(LVar9, 1)
230 Call(GetTargetListLength, LVar0)
232 Goto(11)
233 EndIf
237 IfEq(LFlag0, TRUE)
238 ExecWait(N(EVS_JumpSupport_Rebound))
239 Return
240 EndIf
241 ExecWait(N(EVS_JumpSupport_NoFollowUp))
242 Return
246 IfEq(LFlag0, TRUE)
247 ExecWait(N(EVS_JumpSupport_Rebound))
248 Return
249 EndIf
252 Add(LVarF, 1)
253 Goto(10)
254 Return
255 End
256};
257
258EvtScript N(EVS_UseMove_Super) = {
259 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
260 Call(action_command_jump_init)
261 Call(SetGoalToFirstTarget, ACTOR_SELF)
262 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
263 Sub(LVar0, 20)
264 Call(InitTargetIterator)
265 Call(SetGoalToTarget, ACTOR_PLAYER)
266 Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
267 Sub(LVar3, Float(70.0))
269 Sub(LVar0, 20)
270 Set(LVar3, LVar0)
271 EndIf
272 Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
273 Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0)
274 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH)
275 Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0))
276 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
277 Call(CancelablePlayerRunToGoal, 0, LVar0)
278 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
279 Call(SetGoalToTarget, ACTOR_PLAYER)
280 Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0)
281 ExecWait(N(EVS_CheckForAPress))
282 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
283 ExecWait(N(EVS_JumpSupport_CalcJumpTime))
284 Set(LVarB, LVarA)
285 Add(LVarB, 2)
286 Call(action_command_jump_start, LVarB, 3)
287 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_MIDAIR)
288 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
289 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp)
290 Call(PlayerBasicJumpToGoal, LVarA, PLAYER_BASIC_JUMP_0)
292 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
293 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
294 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
295 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
296 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
297 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
298 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
299 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
302 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
303 Add(LVar0, 24)
304 Add(LVar1, 10)
305 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
306 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
308 Wait(10)
309 Call(InitTargetIterator)
310 Call(GetPlayerActionSuccess, LVarB)
311 Set(LVar9, 0)
312 Label(1)
313 Call(SetGoalToTarget, ACTOR_PLAYER)
316 Goto(2)
317 EndIf
319 CaseGt(FALSE)
326 Label(2)
327 Call(ChooseNextTarget, ITER_NEXT, LVar0)
328 Add(LVar9, 1)
329 Call(GetTargetListLength, LVar0)
331 Goto(1)
332 EndIf
336 ExecWait(N(EVS_JumpSupport_NoFollowUp))
337 Return
344 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH)
345 Wait(5)
346 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
347 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
349 Call(GetActionResult, LVarE)
350 Set(LVarF, 0)
351 Set(LFlag0, FALSE)
352 Label(10)
354 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH)
355 Wait(5)
356 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
357 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
359 Call(CloseActionCommandInfo)
360 Call(SetActionDifficultyTable, Ref(N(DifficultyTable)))
361 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
362 Call(action_command_jump_init)
363 Set(LVarA, 39)
365 CaseEq(0)
366 Call(action_command_jump_start, LVarA, 3)
367 CaseEq(1)
368 Call(action_command_jump_start, LVarA, 3)
369 CaseEq(2)
370 Call(action_command_jump_start, LVarA, 4)
371 CaseEq(3)
372 Call(action_command_jump_start, LVarA, 4)
374 Call(action_command_jump_start, LVarA, 5)
376 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
377 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump)
378 Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE)
379 IfEq(LVarF, 0)
380 Call(PlayerSuperJumpToGoal, 20, PLAYER_SUPER_JUMP_3)
381 Wait(7)
382 Call(PlayerSuperJumpToGoal, 3, PLAYER_SUPER_JUMP_6)
383 Else
384 Call(PlayerSuperJumpToGoal, 20, PLAYER_SUPER_JUMP_4)
385 Wait(7)
386 Call(PlayerSuperJumpToGoal, 3, PLAYER_SUPER_JUMP_5)
387 EndIf
388 Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
390 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
391 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
392 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
393 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
394 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
395 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
396 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
397 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
400 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
401 Add(LVar0, 24)
402 Add(LVar1, 10)
403 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
404 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
406 Wait(10)
407 Call(GetCommandAutoSuccess, LVar1)
408 IfEq(LVar1, 1)
409 IfGt(LVarF, 4)
410 Set(LFlag0, TRUE)
411 EndIf
412 EndIf
413 Set(LVar0, 4)
414 Call(N(func_802A10E4_785C04))
416 Set(LFlag0, TRUE)
417 EndIf
418 Call(InitTargetIterator)
419 Call(GetPlayerActionSuccess, LVarB)
420 Set(LVar9, 0)
421 Label(11)
422 Call(SetGoalToTarget, ACTOR_PLAYER)
425 Goto(12)
426 EndIf
428 CaseGt(FALSE)
429 IfEq(LFlag0, FALSE)
432 Else
435 EndIf
441 CaseEq(0)
442 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1)
443 CaseEq(1)
444 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2)
445 CaseEq(2)
446 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3)
447 CaseEq(3)
448 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
450 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
452 Call(SetActionResult, LVarE)
453 Label(12)
454 Call(ChooseNextTarget, ITER_NEXT, LVar0)
455 Add(LVar9, 1)
456 Call(GetTargetListLength, LVar0)
458 Goto(1)
459 EndIf
463 IfEq(LFlag0, TRUE)
464 ExecWait(N(EVS_JumpSupport_Rebound))
465 Return
466 EndIf
467 ExecWait(N(EVS_JumpSupport_NoFollowUp))
468 Return
472 IfEq(LFlag0, TRUE)
473 ExecWait(N(EVS_JumpSupport_Rebound))
474 Return
475 EndIf
478 Add(LVarF, 1)
479 Goto(10)
480 Return
481 End
482};
483
484EvtScript N(EVS_UseMove_Ultra) = {
485 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
486 Call(action_command_jump_init)
487 Call(SetGoalToFirstTarget, ACTOR_SELF)
488 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
489 Sub(LVar0, 20)
490 Call(InitTargetIterator)
491 Call(SetGoalToTarget, ACTOR_PLAYER)
492 Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
493 Sub(LVar3, Float(70.0))
495 Sub(LVar0, 20)
496 Set(LVar3, LVar0)
497 EndIf
498 Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
499 Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0)
500 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH)
501 Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0))
502 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
503 Call(CancelablePlayerRunToGoal, 0, LVar0)
504 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
505 Call(SetGoalToTarget, ACTOR_PLAYER)
506 Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0)
507 ExecWait(N(EVS_CheckForAPress))
508 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
509 ExecWait(N(EVS_JumpSupport_CalcJumpTime))
510 Set(LVarB, LVarA)
511 Add(LVarB, 2)
512 Call(action_command_jump_start, LVarB, 3)
513 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_MIDAIR)
514 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
515 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp)
516 Call(PlayerBasicJumpToGoal, LVarA, PLAYER_BASIC_JUMP_0)
518 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
519 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
520 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
521 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
522 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
523 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
524 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
525 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
528 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
529 Add(LVar0, 24)
530 Add(LVar1, 10)
531 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
532 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
534 Wait(10)
535 Call(InitTargetIterator)
536 Call(GetPlayerActionSuccess, LVarB)
537 Set(LVar9, 0)
538 Label(1)
539 Call(SetGoalToTarget, ACTOR_PLAYER)
542 Goto(2)
543 EndIf
545 CaseGt(FALSE)
552 Label(2)
553 Call(ChooseNextTarget, ITER_NEXT, LVar0)
554 Add(LVar9, 1)
555 Call(GetTargetListLength, LVar0)
557 Goto(1)
558 EndIf
562 ExecWait(N(EVS_JumpSupport_NoFollowUp))
563 Return
570 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH)
571 Wait(5)
572 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
573 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
575 Call(GetActionResult, LVarE)
576 Set(LVarF, 0)
577 Set(LFlag0, FALSE)
578 Label(10)
580 Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH)
581 Wait(5)
582 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
583 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH)
585 Call(CloseActionCommandInfo)
586 Call(SetActionDifficultyTable, Ref(N(DifficultyTable)))
587 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
588 Call(action_command_jump_init)
589 Set(LVarA, 27)
591 CaseEq(0)
592 Call(action_command_jump_start, LVarA, 3)
593 CaseEq(1)
594 Call(action_command_jump_start, LVarA, 3)
595 CaseEq(2)
596 Call(action_command_jump_start, LVarA, 4)
597 CaseEq(3)
598 Call(action_command_jump_start, LVarA, 4)
600 Call(action_command_jump_start, LVarA, 5)
602 Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0)
603 Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE)
604 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall)
605 IfEq(LVarF, 0)
606 Call(PlayerUltraJumpToGoal, 25, PLAYER_ULTRA_JUMP_2)
607 Else
608 Call(PlayerUltraJumpToGoal, 25, PLAYER_ULTRA_JUMP_4)
609 EndIf
610 Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE)
612 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
613 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
614 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0))
615 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
616 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7))
617 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4))
618 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1))
619 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05))
622 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
623 Add(LVar0, 24)
624 Add(LVar1, 10)
625 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
626 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
628 Wait(10)
629 Call(GetCommandAutoSuccess, LVar1)
630 IfEq(LVar1, 1)
631 IfGt(LVarF, 5)
632 Set(LFlag0, TRUE)
633 EndIf
634 EndIf
635 Set(LVar0, 5)
636 Call(N(func_802A10E4_785C04))
638 Set(LFlag0, TRUE)
639 EndIf
640 Call(InitTargetIterator)
641 Call(GetPlayerActionSuccess, LVarB)
642 Set(LVar9, 0)
643 Label(11)
644 Call(SetGoalToTarget, ACTOR_PLAYER)
647 Goto(12)
648 EndIf
650 CaseGt(FALSE)
651 IfEq(LFlag0, FALSE)
654 Else
657 EndIf
663 CaseEq(0)
664 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1)
665 CaseEq(1)
666 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2)
667 CaseEq(2)
668 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3)
669 CaseEq(3)
670 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
672 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4)
674 Call(SetActionResult, LVarE)
675 Label(12)
676 Call(ChooseNextTarget, ITER_NEXT, LVar0)
677 Add(LVar9, 1)
678 Call(GetTargetListLength, LVar0)
680 Goto(1)
681 EndIf
685 IfEq(LFlag0, TRUE)
686 ExecWait(N(EVS_JumpSupport_Rebound))
687 Return
688 EndIf
689 ExecWait(N(EVS_JumpSupport_NoFollowUp))
690 Return
694 IfEq(LFlag0, TRUE)
695 ExecWait(N(EVS_JumpSupport_Rebound))
696 Return
697 EndIf
700 Add(LVarF, 1)
701 Goto(10)
702 Return
703 End
704};
Bytecode EvtScript[]
@ ACTION_COMMAND_JUMP
Definition enums.h:3473
@ ACTOR_SOUND_HURT
Definition enums.h:2037
@ BS_FLAGS1_NO_RATING
Definition enums.h:3577
@ 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
@ PLAYER_ULTRA_JUMP_2
Definition enums.h:4315
@ PLAYER_ULTRA_JUMP_4
Definition enums.h:4317
@ ITER_NEXT
Definition enums.h:2025
@ PLAYER_SUPER_JUMP_3
Definition enums.h:4306
@ PLAYER_SUPER_JUMP_4
Definition enums.h:4307
@ PLAYER_SUPER_JUMP_5
Definition enums.h:4308
@ PLAYER_SUPER_JUMP_6
Definition enums.h:4309
@ 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_PLAYER_PRE_ULTRA_JUMP_FINISH
Definition enums.h:4850
@ BTL_CAM_PLAYER_PRE_JUMP_FINISH
Definition enums.h:4849
@ BTL_CAM_PLAYER_JUMP_FINISH
Definition enums.h:4857
@ BTL_CAM_PLAYER_JUMP_MIDAIR
Definition enums.h:4856
@ BTL_CAM_PLAYER_ATTACK_APPROACH
Definition enums.h:4848
@ PLAYER_BASIC_JUMP_3
Definition enums.h:4298
@ PLAYER_BASIC_JUMP_4
Definition enums.h:4299
@ PLAYER_BASIC_JUMP_0
Definition enums.h:4295
@ SOUND_ACTOR_JUMPED_2
Definition enums.h:778
@ SOUND_JUMP_COMBO_1
Definition enums.h:954
@ SOUND_ACTOR_JUMPED_1
Definition enums.h:777
@ SOUND_NONE
Definition enums.h:547
@ SOUND_JUMP_COMBO_4
Definition enums.h:957
@ SOUND_JUMP_COMBO_3
Definition enums.h:956
@ SOUND_ACTOR_JUMPED_3
Definition enums.h:779
@ SOUND_JUMP_COMBO_2
Definition enums.h:955
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_BLUR_ENABLE
Definition enums.h:6414
@ ACTOR_BLUR_DISABLE
Definition enums.h:6413
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2877
@ DAMAGE_TYPE_QUAKE
Definition enums.h:2862
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
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 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 LFlagA
Definition macros.h:177
#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 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 LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define PlayEffect(args...)
Definition macros.h:807
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define 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 LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVarE
Definition macros.h:162
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217