Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
attack.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
4#include "sprite/player.h"
5
6#define NAMESPACE battle_move_jump_attack
7
9
10API_CALLABLE(N(GetJumpDamage)) {
11 script->varTable[15] = 1;
12
13 switch (gPlayerData.bootsLevel) {
15 script->varTable[15] = 1;
16 break;
17 case GEAR_RANK_SUPER:
18 script->varTable[15] = 2;
19 break;
20 case GEAR_RANK_ULTRA:
21 script->varTable[15] = 3;
22 break;
23 }
24
25 return ApiStatus_DONE2;
26}
27
32
34 Call(ShowActionHud, true)
38 Return
39 EndIf
42 CaseEq(0)
44 CaseEq(1)
46 CaseEq(2)
49 Return
50 End
51};
52
58 Loop(0)
62 EndIf
63 Wait(1)
65 EndIf
69 Return
70 EndIf
73 Wait(1)
74 EndIf
87 // missed action command, end the script here
89 Return
93 // successful action command, continue with script
98 Wait(5)
111 Wait(1)
116 Return
117 End
118};
119
125 Return
126 EndIf
127 Wait(1)
141 Return
150 Wait(5)
163 Wait(7)
166 Wait(1)
171 Return
172 End
173};
174
180 Return
181 EndIf
182 Wait(1)
196 Return
205 Wait(5)
219 Wait(1)
224 Return
225 End
226};
227
231
233 Call(ShowActionHud, true)
236 CaseEq(0)
238 CaseEq(1)
240 CaseEq(2)
243 Return
244 End
245};
246
250 Sub(LVar3, 40)
251 Set(LVar4, 40)
259 Sub(LVar0, LVar3)
260 Sub(LVar0, 20)
261 DivF(LVar0, Float(10.588))
262 AddF(LVar0, 15)
263 Set(LVarA, LVar0)
272 Return
273 End
274};
275
279 Sub(LVar3, 40)
280 Set(LVar4, 40)
288 Wait(7)
295 Return
296 End
297};
298
302 Sub(LVar3, 40)
303 Set(LVar4, 40)
311 Set(LVarA, 4)
316 Return
317 End
318};
319
323
325 Call(ShowActionHud, true)
328 CaseEq(0)
330 CaseEq(1)
332 CaseEq(2)
335 Return
336 End
337};
338
344 Return
345 EndIf
346 Wait(1)
360 Return
368 Wait(5)
381 Wait(1)
386 Return
387 End
388};
389
395 Return
396 EndIf
397 Wait(1)
411 Return
420 Wait(5)
433 Wait(7)
436 Wait(1)
441 Return
442 End
443};
444
452 Return
453 EndIf
454 Wait(1)
468 Return
477 Wait(5)
491 Wait(1)
496 Return
497 End
498};
499
508 Call(AddGoalPos, ACTOR_PLAYER, -5, 10, 0)
514 Loop(0)
518 EndIf
519 Wait(1)
520 EndLoop
521 EndIf
525 Return
526 EndIf
529 Wait(1)
530 EndIf
544 Return
552 Wait(5)
565 Wait(1)
570 Return
571 End
572};
BSS s32 PopupMenu_SelectedIndex
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
@ AC_MODE_TUTORIAL_WAIT_INPUT
Definition action_cmd.h:63
@ AC_MODE_TUTORIAL
Definition action_cmd.h:62
@ AC_MODE_NOT_LEARNED
Definition action_cmd.h:60
Bytecode EvtScript[]
@ ACTION_COMMAND_JUMP
Definition enums.h:3507
@ ACTOR_SOUND_HURT
Definition enums.h:2070
@ BS_FLAGS1_NO_RATING
Definition enums.h:3610
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3609
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3608
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3604
@ PLAYER_ULTRA_JUMP_0
Definition enums.h:3898
@ PLAYER_ULTRA_JUMP_4
Definition enums.h:3902
@ PLAYER_ULTRA_JUMP_1
Definition enums.h:3899
@ PLAYER_SUPER_JUMP_0
Definition enums.h:3888
@ PLAYER_SUPER_JUMP_4
Definition enums.h:3892
@ PLAYER_SUPER_JUMP_1
Definition enums.h:3889
@ PLAYER_SUPER_JUMP_5
Definition enums.h:3893
@ BS_FLAGS2_DOING_JUMP_TUTORIAL
Definition enums.h:3645
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1978
@ HIT_RESULT_HIT
Definition enums.h:1976
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1979
@ HIT_RESULT_NICE
Definition enums.h:1977
@ HIT_RESULT_MISS
Definition enums.h:1982
@ BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH
Definition enums.h:4435
@ BTL_CAM_PLAYER_PRE_JUMP_FINISH
Definition enums.h:4434
@ BTL_CAM_PLAYER_SUPER_JUMP_MIDAIR
Definition enums.h:4444
@ BTL_CAM_PLAYER_JUMP_FINISH
Definition enums.h:4442
@ BTL_CAM_PLAYER_JUMP_MIDAIR
Definition enums.h:4441
@ BTL_CAM_PLAYER_ULTRA_JUMP_MIDAIR
Definition enums.h:4445
@ PLAYER_BASIC_JUMP_3
Definition enums.h:3883
@ PLAYER_BASIC_JUMP_0
Definition enums.h:3880
@ SOUND_ACTOR_JUMPED_2
Definition enums.h:781
@ SOUND_ACTOR_JUMPED_1
Definition enums.h:780
@ SOUND_NONE
Definition enums.h:550
@ SOUND_ACTOR_JUMPED_3
Definition enums.h:782
@ GEAR_RANK_SUPER
Definition enums.h:2046
@ GEAR_RANK_ULTRA
Definition enums.h:2047
@ GEAR_RANK_NORMAL
Definition enums.h:2045
@ ACTOR_PLAYER
Definition enums.h:2118
@ ACTOR_BLUR_RESET
Definition enums.h:6006
@ ACTOR_BLUR_ENABLE
Definition enums.h:6005
@ DAMAGE_TYPE_JUMP
Definition enums.h:2892
#define ApiStatus_DONE2
Definition evt.h:119
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#define DivF(VAR, FLOAT_VALUE)
Definition macros.h:387
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:366
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:384
#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:320
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:564
#define Sub(VAR, INT_VALUE)
Definition macros.h:378
#define LVarF
Definition macros.h:164
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define EndLoop
Marks the end of a loop.
Definition macros.h:249
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:353
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:279
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:276
#define Float(DOUBLE)
Definition macros.h:52
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:342
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:299
#define LVar5
Definition macros.h:154
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:476
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:252
#define IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:289
#define LVar2
Definition macros.h:151
#define LVar1
Definition macros.h:150
#define LVarA
Definition macros.h:159
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:363
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:270
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:561
#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:329
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:246
#define LVar4
Definition macros.h:153
#define LVar3
Definition macros.h:152
#define LVar0
Definition macros.h:149
#define Return
Kills the current EVT thread.
Definition macros.h:218
PlayerData gPlayerData
Definition 77480.c:39