Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
bow.c
Go to the documentation of this file.
1#include "battle/battle.h"
2#include "script_api/battle.h"
3#include "effects.h"
6#include "sprite/npc/BattleBow.h"
7#include "sprite/player.h"
8
9#define NAMESPACE battle_partner_bow
10
12extern EvtScript N(EVS_Idle);
14extern EvtScript N(EVS_TakeTurn);
15extern EvtScript N(EVS_Init);
17extern EvtScript N(EVS_Celebrate);
18extern EvtScript N(runAway);
19extern EvtScript N(runAwayFail);
20extern EvtScript N(smack);
21extern EvtScript N(outtaSight);
22extern EvtScript N(spook);
23extern EvtScript N(fanSmack);
24extern EvtScript N(hidePlayer);
25
26extern s32 bMarioHideAnims[];
27
28enum N(ActorPartIDs) {
29 PRT_MAIN = 1,
30 PRT_ZERO = 0,
31};
32
33API_CALLABLE(N(IsOuttaSightActive)) {
35 script->varTable[0] = battleStatus->outtaSightActive;
36
37 return ApiStatus_DONE2;
38}
39
40API_CALLABLE(N(GetBowSize)) {
42 Actor* partnerActor = battleStatus->partnerActor;
45
47 script->varTable[0] = partnerTargetActorSize;
48
49 return ApiStatus_DONE2;
50}
51
52API_CALLABLE(N(ApplyOuttaSight)) {
54
58 }
59
60 playerActorPartTable->idleAnimations = bMarioHideAnims;
63
64 return ApiStatus_DONE2;
65}
66
67API_CALLABLE(N(ModifyBowPos)) {
69 Bytecode* args = script->ptrReadPos;
70 Actor* playerActor = battleStatus->playerActor;
73 f32 scalingFactor = playerActor->scalingFactor;
74
75 deltaX *= scalingFactor;
76 script->varTable[0] += deltaX;
77
78 deltaY *= scalingFactor;
79 script->varTable[1] += deltaY;
80
81 return ApiStatus_DONE2;
82}
83
85API_CALLABLE(N(IsPartnerImmobile)) {
87 Actor* playerActor = battleStatus->playerActor;
88 s32 isImmobile = playerActor->debuff == STATUS_KEY_FEAR
89 || playerActor->debuff == STATUS_KEY_DIZZY
90 || playerActor->debuff == STATUS_KEY_PARALYZE
91 || playerActor->debuff == STATUS_KEY_SLEEP
92 || playerActor->debuff == STATUS_KEY_FROZEN
93 || playerActor->debuff == STATUS_KEY_STOP;
94
95 if (playerActor->stoneStatus == STATUS_KEY_STONE) {
97 }
98
99 script->varTable[0] = isImmobile;
100 return ApiStatus_DONE2;
101}
102
103API_CALLABLE(N(RestorePlayerIdleAnimations)) {
105 Actor* playerActor = battleStatus->playerActor;
106 ActorPart* playerActorPartTable = battleStatus->playerActor->partsTable;
108
109 return ApiStatus_DONE2;
110}
111
112API_CALLABLE(N(AverageSpookChance)) {
114 Actor* partnerActor = battleStatus->partnerActor;
118 s32 spookChance;
119 s32 chanceTotal = 0;
120 s32 nTargets = 0;
121 s32 i;
122
123 for (i = 0; i < partnerActor->targetListLength; i++) {
124 targetActor = get_actor(partnerActor->targetData[i].actorID);
126 targetActorBlueprint = targetActor->actorBlueprint;
127 spookChance = targetActorBlueprint->spookChance;
128
129 if (targetActor->transparentStatus == STATUS_KEY_TRANSPARENT) {
130 spookChance = 0;
131 }
132
133 if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
134 spookChance = 0;
135 }
136
137 if (spookChance > 0) {
138 chanceTotal += spookChance;
139 nTargets++;
140 }
141 }
142
143 if (nTargets > 0) {
144 script->varTable[0] = chanceTotal / nTargets;
145 } else {
146 script->varTable[0] = 0;
147 }
148
149 return ApiStatus_DONE2;
150}
151
152s32 N(DefaultAnims)[] = {
161};
162
163s32 N(DefenseTable)[] = {
166};
167
168s32 N(StatusTable)[] = {
171 STATUS_KEY_SLEEP, 100,
174 STATUS_KEY_DIZZY, 100,
175 STATUS_KEY_FEAR, 100,
179 STATUS_KEY_STOP, 100,
191};
192
194 {
195 .flags = 0,
196 .index = PRT_MAIN,
197 .posOffset = { 0, 0, 0 },
198 .targetOffset = { 9, 19 },
199 .opacity = 255,
200 .idleAnimations = N(DefaultAnims),
201 .defenseTable = N(DefenseTable),
202 .eventFlags = 0,
203 .elementImmunityFlags = 0,
204 .projectileTargetOffset = { 0, 0 },
205 },
206};
207
208ActorBlueprint NAMESPACE = {
209 .flags = ACTOR_FLAG_FLYING,
210 .type = ACTOR_TYPE_BOW,
211 .level = ACTOR_LEVEL_BOW,
212 .maxHP = 99,
213 .partCount = ARRAY_COUNT(N(ActorParts)),
214 .partsData = N(ActorParts),
215 .initScript = &N(EVS_Init),
216 .statusTable = N(StatusTable),
217 .escapeChance = 0,
218 .airLiftChance = 0,
219 .hurricaneChance = 0,
220 .spookChance = 0,
221 .upAndAwayChance = 0,
222 .spinSmashReq = 4,
223 .powerBounceChance = 80,
224 .coinReward = 0,
225 .size = { 36, 29 },
226 .healthBarOffset = { 0, 0 },
227 .statusIconOffset = { -10, 22 },
228 .statusTextOffset = { 10, 22 },
229};
230
231EvtScript N(EVS_Init) = {
236 Return
237 End
238};
239
240EvtScript N(EVS_Idle) = {
241 Return
242 End
243};
244
267 Set(LVar2, 14)
273 Set(LVar2, 14)
286 Set(LVar2, 14)
295 Set(LVar3, 20)
303 Wait(10)
308 Return
309 End
310};
311
320 ExecWait(N(runAway))
324 Return
325 End
326};
327
330 Wait(36)
332 Return
333 End
334};
335
336EvtScript N(runAway) = {
340 Return
341 End
342};
343
353 Return
354 End
355};
356
362 IfNe(LVar0, 0)
364 EndIf
366 Return
367 End
368};
369
377 Return
382 ExecWait(N(smack))
384 ExecWait(N(smack))
386 ExecWait(N(smack))
392 ExecWait(N(spook))
396 Return
397 End
398};
399
404 Thread
405 Set(LVar0, 200)
406 Loop(20)
407 Sub(LVar0, 10)
409 Wait(1)
410 EndLoop
412 Wait(10)
418 Set(LVar0, 55)
419 Loop(20)
420 Add(LVar0, 10)
422 Wait(1)
423 EndLoop
425 Return
426 End
427};
428
433 Thread
434 Set(LVar0, 200)
435 Loop(20)
436 Sub(LVar0, 10)
438 Wait(1)
439 EndLoop
441 Wait(10)
447 Set(LVar0, 55)
448 Loop(20)
449 Add(LVar0, 10)
451 Wait(1)
452 EndLoop
454 Return
455 End
456};
457
458EvtScript N(80238EE0) = {
464 Return
465 End
466};
467
468EvtScript N(smack) = {
475 Call(SetupMashMeter, 4, 40, 70, 99, 100, 0)
476 Set(LVarB, 60 * DT)
477 Set(LVarC, 1)
479 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
480 Set(LVarB, 60 * DT)
481 Set(LVarC, 1)
483 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
484 Set(LVarB, 60 * DT)
485 Set(LVarC, 1)
487 Wait(10)
488 Thread
489 Wait(10)
490 Set(LVar0, LVarB)
491 Add(LVar0, -3)
499 Thread
501 Call(AddGoalPos, ACTOR_PARTNER, -15, -10, 0)
511 Wait(15)
513 Set(LVar0, 55)
514 Loop(5)
515 Add(LVar0, 40)
517 Wait(1)
518 EndLoop
522 Wait(20)
523 Set(LVarF, 0)
524 Set(LVarE, 0)
525 Set(LVarD, 0)
529 Loop(15)
531 Wait(1)
533 Wait(1)
534 EndLoop
537 Label(0)
542 Set(LVar0, 0)
543 Loop(20)
544 Add(LVar0, -45)
546 Wait(1)
547 EndLoop
551 Wait(30)
554 Wait(10)
556 Return
557 EndIf
558 Add(LVarE, 1)
560 Goto(2)
561 EndIf
562 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
565 Set(LFlag0, TRUE)
567 Else
571 EndIf
572 Wait(2)
573 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
574 Thread
575 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
576 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
577 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
578 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
580 IfEq(LVarE, 1)
581 Call(N(GetBowSize))
584 Else
587 EndIf
589 IfEq(LVarE, 1)
590 IfGt(LVarB, 99)
592 Else
594 EndIf
595 Goto(1)
596 Else
597 IfGt(LVarB, 99)
599 Else
601 EndIf
602 Goto(1)
603 EndIf
604 Label(1)
605 Wait(8)
606 Add(LVarF, 10)
608 Goto(0)
609 Label(2)
610 IfEq(LVarE, 1)
611 Call(N(GetBowSize))
614 Else
617 EndIf
618 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
621 Set(LFlag0, TRUE)
623 Else
627 EndIf
628 Wait(2)
629 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
633 CaseGt(99)
638 Wait(8)
651 Return
652 End
653};
654
659 Call(SetBattleCamTarget, -129, 28, 0)
663 Thread
665 Add(LVar1, 5)
669 Set(LVar0, 0)
670 Loop(10)
671 Add(LVar0, 18)
673 Wait(1)
674 EndLoop
675 Wait(10)
677 Add(LVar0, -30)
678 Add(LVar1, 30)
681 Thread
682 Set(LVar0, 180)
683 Loop(10)
684 Sub(LVar0, 18)
686 Wait(1)
687 EndLoop
689 Thread
690 Set(LVar0, 255)
691 Loop(30)
692 Sub(LVar0, 5)
694 Wait(1)
695 EndLoop
698 Call(N(ModifyBowPos), -10, 20)
699 Add(LVar2, 5)
703 IfEq(LVar0, 0)
705 EndIf
707 Set(LVar0, 255)
708 Loop(15)
709 Sub(LVar0, 10)
711 Wait(1)
712 EndLoop
713 Wait(15)
718 Return
719 End
720};
721
724 Wait(20)
726 Thread
727 Wait(10)
728 Set(LVar0, 105)
729 Loop(30)
730 Add(LVar0, 5)
732 Wait(1)
733 EndLoop
735 Thread
736 Set(LVar0, 105)
737 Loop(30)
738 Add(LVar0, 5)
740 Wait(1)
741 EndLoop
749 Wait(20)
750 Return
751 End
752};
753
754EvtScript N(spook) = {
757 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
759 Wait(10)
760 Thread
769 Add(LVar0, 40)
770 Add(LVar1, 10)
773 Wait(15)
775 Thread
776 Wait(74)
777 Loop(8)
779 Wait(1)
781 Wait(1)
782 EndLoop
783 Loop(7)
785 Wait(1)
787 Wait(1)
788 EndLoop
789 Loop(8)
791 Wait(1)
793 Wait(1)
794 EndLoop
801 Set(LVar1, 0)
802 Set(LVar2, 0)
803 Loop(90 * DT)
805 CaseGt(80)
806 IfEq(LVar2, 7)
810 Set(LVar2, 8)
811 EndIf
812 CaseGt(70)
813 IfEq(LVar2, 6)
817 Set(LVar2, 7)
818 EndIf
819 CaseGt(60)
820 IfEq(LVar2, 5)
824 Set(LVar2, 6)
825 EndIf
826 CaseGt(50)
827 IfEq(LVar2, 4)
831 Set(LVar2, 5)
832 EndIf
833 CaseGt(40)
834 IfEq(LVar2, 3)
838 Set(LVar2, 4)
839 EndIf
840 CaseGt(30)
841 IfEq(LVar2, 2)
845 Set(LVar2, 3)
846 EndIf
847 CaseGt(20)
848 IfEq(LVar2, 1)
852 Set(LVar2, 2)
853 EndIf
854 CaseGt(10)
855 IfEq(LVar2, 0)
859 Set(LVar2, 1)
860 EndIf
862 Add(LVar1, 1)
863 Wait(1)
864 EndLoop
868 Thread
871 Wait(5)
873 Loop(5)
875 Wait(2)
877 Wait(2)
878 EndLoop
880 Thread
881 Set(LVar0, 255)
882 Loop(15)
883 Sub(LVar0, 10)
885 Wait(1)
886 EndLoop
889 SetF(LVar0, Float(1.0))
892 CaseLe(20)
893 SetF(LVar1, Float(0.3))
894 CaseLe(40)
895 SetF(LVar1, Float(0.4))
896 CaseLe(60)
897 SetF(LVar1, Float(0.5))
898 CaseLe(80)
899 SetF(LVar1, Float(0.6))
901 SetF(LVar1, Float(0.7))
903 Loop(5)
906 Wait(1)
907 EndLoop
909 Thread
910 Loop(5)
911 Loop(3)
912 SubF(LVar0, Float(0.23))
914 Wait(1)
915 EndLoop
916 Loop(3)
917 AddF(LVar0, Float(0.23))
919 Wait(1)
920 EndLoop
921 EndLoop
924 Add(LVar1, 32)
927 Wait(15)
930 Loop(0)
933 IfEq(LVar0, 6)
934 Goto(10)
935 EndIf
938 CaseGt(99)
943 Label(10)
944 Wait(5)
948 EndIf
949 EndLoop
952 CaseGt(99)
957 Wait(30)
958 Thread
959 Set(LVar0, 105)
960 Loop(15)
961 Add(LVar0, 10)
963 Wait(1)
964 EndLoop
968 CaseLe(20)
969 SetF(LVar1, Float(0.3))
970 CaseLe(40)
971 SetF(LVar1, Float(0.4))
972 CaseLe(60)
973 SetF(LVar1, Float(0.5))
974 CaseLe(80)
975 SetF(LVar1, Float(0.6))
977 SetF(LVar1, Float(0.7))
980 Loop(5)
983 Wait(1)
984 EndLoop
985 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
987 ExecWait(N(80238EE0))
988 Return
989 End
990};
991
992EvtScript N(fanSmack) = {
996 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
997 Set(LVarB, 90 * DT)
998 Set(LVarC, 2)
999 Wait(10)
1000 Thread
1001 Wait(10)
1002 Set(LVar0, LVarB)
1003 Add(LVar0, -3)
1006 EndThread
1011 Thread
1013 Call(AddGoalPos, ACTOR_PARTNER, -25, -10, 0)
1015 EndThread
1022 Wait(15)
1024 Set(LVar0, 55)
1025 Loop(5)
1026 Add(LVar0, 40)
1028 Wait(1)
1029 EndLoop
1033 Wait(20)
1034 Set(LVarF, 0)
1035 Set(LVarE, 0)
1036 Set(LVarD, 0)
1037 Set(LFlag0, FALSE)
1041 Loop(30)
1043 Wait(1)
1045 Wait(1)
1046 EndLoop
1049 Label(0)
1054 Set(LVar0, 0)
1055 Loop(15)
1056 Add(LVar0, -45)
1058 Wait(1)
1059 EndLoop
1060 Loop(15)
1061 Add(LVar0, -90)
1063 Wait(1)
1064 EndLoop
1068 Wait(40)
1071 Wait(10)
1073 Return
1074 EndIf
1075 Add(LVarE, 1)
1076 IfGt(LVarE, LVarD)
1077 Goto(2)
1078 EndIf
1079 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
1080 IfEq(LFlag0, FALSE)
1082 Set(LFlag0, TRUE)
1084 Else
1086 Set(LFlag0, FALSE)
1088 EndIf
1089 Wait(2)
1090 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1091 Thread
1092 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
1093 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
1094 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
1095 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
1096 EndThread
1097 IfEq(LVarE, 1)
1098 Call(N(GetBowSize))
1101 Else
1104 EndIf
1106 PlayEffect(EFFECT_CONFETTI, 5, LVar0, LVar1, LVar2, Float(1.0), 20, 0)
1108 IfEq(LVarE, 1)
1109 IfGt(LVarB, 99)
1111 Else
1113 EndIf
1114 Goto(1)
1115 Else
1116 IfGt(LVarB, 99)
1118 Else
1120 EndIf
1121 Goto(1)
1122 EndIf
1123 Label(1)
1124 IfEq(LVarE, 1)
1125 Set(LVar0, 0)
1126 Loop(8)
1127 Add(LVar0, 144)
1129 Wait(1)
1130 EndLoop
1131 Else
1132 Set(LVar0, 0)
1133 Loop(8)
1134 Sub(LVar0, 144)
1136 Wait(1)
1137 EndLoop
1138 EndIf
1140 Add(LVarF, 10)
1142 Goto(0)
1143 Label(2)
1144 Thread
1145 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
1146 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
1147 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
1148 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
1149 EndThread
1150 IfEq(LVarE, 1)
1151 Call(N(GetBowSize))
1154 Else
1157 EndIf
1158 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
1159 IfEq(LFlag0, FALSE)
1161 Set(LFlag0, TRUE)
1163 Else
1165 Set(LFlag0, FALSE)
1167 EndIf
1168 Wait(2)
1169 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1172 Switch(LVar0)
1173 CaseGt(99)
1177 EndSwitch
1178 Thread
1179 IfEq(LVarE, 1)
1180 Set(LVar0, 0)
1181 Loop(8)
1182 Add(LVar0, 144)
1184 Wait(1)
1185 EndLoop
1186 Else
1187 Set(LVar0, 0)
1188 Loop(8)
1189 Sub(LVar0, 144)
1191 Wait(1)
1192 EndLoop
1193 EndIf
1194 IfEq(LVarE, 1)
1195 Set(LVar0, 0)
1196 Loop(8)
1197 Add(LVar0, 72)
1199 Wait(1)
1200 EndLoop
1201 Else
1202 Set(LVar0, 0)
1203 Loop(8)
1204 Sub(LVar0, 72)
1206 Wait(1)
1207 EndLoop
1208 EndIf
1210 EndThread
1211 Switch(LVar0)
1214 Wait(10)
1218 CaseOrEq(1)
1219 CaseOrEq(3)
1220 Wait(10)
1224 EndSwitch
1225 Return
1226 End
1227};
1228
BSS s32 PopupMenu_SelectedIndex
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
s32 bMarioHideAnims[]
Definition actors.c:99
u32 * idleAnimations
f32 scalingFactor
struct ActorPart * partsTable
struct SelectableTarget targetData[24]
s16 targetActorID
Bytecode EvtScript[]
s8 targetListLength
@ BTL_CAM_XADJ_NONE
Definition enums.h:4898
@ ACTION_COMMAND_SPOOK
Definition enums.h:3493
@ ACTION_COMMAND_SMACK
Definition enums.h:3490
@ ACTOR_SOUND_HURT
Definition enums.h:2037
@ BS_FLAGS1_NO_RATING
Definition enums.h:3576
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3575
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3570
@ BS_FLAGS1_4000
Definition enums.h:3582
@ 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_FLAG_ILLUSORY
Player attacks pass through and miss.
Definition enums.h:3374
@ ACTOR_DECORATION_SEEING_STARS
Definition enums.h:2046
@ PHASE_RUN_AWAY_START
Definition enums.h:2060
@ PHASE_EXECUTE_ACTION
Definition enums.h:2058
@ PHASE_ENEMY_BEGIN
Definition enums.h:2068
@ PHASE_CELEBRATE
Definition enums.h:2062
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2064
@ BTL_MENU_TYPE_STAR_POWERS
Definition enums.h:4234
@ BS_FLAGS2_PLAYER_TURN_USED
Definition enums.h:3604
@ STATUS_KEY_PARALYZE
Definition enums.h:2201
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2227
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2234
@ STATUS_KEY_FROZEN
Definition enums.h:2203
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2228
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2232
@ STATUS_KEY_TRANSPARENT
Definition enums.h:2210
@ STATUS_KEY_STATIC
Definition enums.h:2207
@ STATUS_END
Definition enums.h:2196
@ STATUS_TURN_MOD_POISON
Definition enums.h:2233
@ STATUS_KEY_FEAR
Definition enums.h:2199
@ STATUS_TURN_MOD_STOP
Definition enums.h:2237
@ STATUS_KEY_SLEEP
Definition enums.h:2202
@ STATUS_KEY_STONE
Definition enums.h:2208
@ STATUS_KEY_STOP
Definition enums.h:2204
@ STATUS_KEY_INACTIVE
Definition enums.h:2214
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2230
@ STATUS_KEY_SHRINK
Definition enums.h:2206
@ STATUS_KEY_DIZZY
Definition enums.h:2200
@ STATUS_KEY_POISON
Definition enums.h:2205
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2229
@ STATUS_TURN_MOD_FEAR
Definition enums.h:2231
@ STATUS_KEY_NORMAL
Definition enums.h:2197
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2235
@ STATUS_KEY_DAZE
Definition enums.h:2209
@ STATUS_KEY_DEFAULT
Definition enums.h:2198
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1953
@ HIT_RESULT_NICE
Definition enums.h:1951
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_RETURN_HOME
Definition enums.h:4825
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_INTERRUPT
Definition enums.h:4822
@ BTL_CAM_REPOSITION
Definition enums.h:4840
@ BTL_CAM_ACTOR_CLOSE
Definition enums.h:4834
@ BTL_CAM_ACTOR_FAR
Definition enums.h:4836
@ BTL_CAM_PARTNER_MISTAKE
Definition enums.h:4872
@ 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_COS_IN_OUT
Definition enums.h:520
@ EASING_LINEAR
Definition enums.h:510
@ STATUS_FLAG_400000
Definition enums.h:2822
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:1999
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2001
@ DMG_SRC_NEXT_FAN_SMACK_LEFT
Definition enums.h:2002
@ DMG_SRC_LAST_FAN_SMACK_LEFT
Definition enums.h:2004
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:1998
@ DMG_SRC_NEXT_FAN_SMACK_RIGHT
Definition enums.h:2003
@ DMG_SRC_SPOOK
Definition enums.h:2006
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2000
@ DMG_SRC_LAST_FAN_SMACK_RIGHT
Definition enums.h:2005
@ SOUND_NO_DAMGE
Definition enums.h:1433
@ SOUND_BOW_APPEAR
Definition enums.h:1324
@ SOUND_BOW_SMACK
Definition enums.h:1334
@ SOUND_BOO_VANISH_A
Definition enums.h:692
@ SOUND_BOW_SPOOK
Definition enums.h:1008
@ SOUND_BOW_FAN_SMACK
Definition enums.h:1335
@ SOUND_BOO_APPEAR_A
Definition enums.h:694
@ SOUND_BOW_VANISH
Definition enums.h:1323
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3329
@ ACTOR_FLAG_NO_INACTIVE_ANIM
Definition enums.h:3345
@ ACTOR_FLAG_USING_IDLE_ANIM
Definition enums.h:3342
@ CAM_PARAM_FOV_SCALE
Definition enums.h:1816
@ BTL_CAM_YADJ_NONE
Definition enums.h:4905
@ 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_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ 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
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1689
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:1191
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
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_SpikeContact
EvtScript EVS_Partner_RunAway
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 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 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 CaseLe(RVAR)
Marks the start of a switch case that executes only if LVAR > RVAR. It also marks the end of any prev...
Definition macros.h:331
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define LVar2
Definition macros.h:150
#define DT
Definition macros.h:526
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarD
Definition macros.h:161
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define SubF(VAR, FLOAT_VALUE)
Definition macros.h:384
#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 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
@ ACV_SMACK_HAND
Definition smack.h:18
@ ACV_SMACK_FAN
Definition smack.h:19
struct Actor * playerActor
BattleStatus gBattleStatus
Definition battle.c:11
u32 bMarioIdleAnims[]
Definition actors.c:53