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
11extern EvtScript N(EVS_HandleEvent);
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(IsPlayerImmobile)) {
87 Actor* playerActor = battleStatus->playerActor;
88 s32 isImmobile = playerActor->debuff == STATUS_KEY_UNUSED
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) {
96 isImmobile = true;
97 }
98
99 script->varTable[0] = isImmobile;
100 return ApiStatus_DONE2;
101}
102
103API_CALLABLE(N(RestorePlayerIdleAnimations)) {
105 ActorPart* playerActorPartTable = battleStatus->playerActor->partsTable;
107
108 return ApiStatus_DONE2;
109}
110
111API_CALLABLE(N(AverageSpookChance)) {
113 Actor* partnerActor = battleStatus->partnerActor;
117 s32 spookChance;
118 s32 chanceTotal = 0;
119 s32 nTargets = 0;
120 s32 i;
121
122 for (i = 0; i < partnerActor->targetListLength; i++) {
123 targetActor = get_actor(partnerActor->targetData[i].actorID);
125 targetActorBlueprint = targetActor->actorBlueprint;
126 spookChance = targetActorBlueprint->spookChance;
127
128 if (targetActor->transparentStatus == STATUS_KEY_TRANSPARENT) {
129 spookChance = 0;
130 }
131
132 if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
133 spookChance = 0;
134 }
135
136 if (spookChance > 0) {
137 chanceTotal += spookChance;
138 nTargets++;
139 }
140 }
141
142 if (nTargets > 0) {
143 script->varTable[0] = chanceTotal / nTargets;
144 } else {
145 script->varTable[0] = 0;
146 }
147
148 return ApiStatus_DONE2;
149}
150
151s32 N(DefaultAnims)[] = {
160};
161
162s32 N(DefenseTable)[] = {
165};
166
167s32 N(StatusTable)[] = {
170 STATUS_KEY_SLEEP, 100,
173 STATUS_KEY_DIZZY, 100,
178 STATUS_KEY_STOP, 100,
190};
191
192ActorPartBlueprint N(ActorParts)[] = {
193 {
194 .flags = 0,
195 .index = PRT_MAIN,
196 .posOffset = { 0, 0, 0 },
197 .targetOffset = { 9, 19 },
198 .opacity = 255,
199 .idleAnimations = N(DefaultAnims),
200 .defenseTable = N(DefenseTable),
201 .eventFlags = 0,
202 .elementImmunityFlags = 0,
203 .projectileTargetOffset = { 0, 0 },
204 },
205};
206
207ActorBlueprint NAMESPACE = {
208 .flags = ACTOR_FLAG_FLYING,
209 .type = ACTOR_TYPE_BOW,
210 .level = ACTOR_LEVEL_BOW,
211 .maxHP = 99,
212 .partCount = ARRAY_COUNT(N(ActorParts)),
213 .partsData = N(ActorParts),
214 .initScript = &N(EVS_Init),
215 .statusTable = N(StatusTable),
216 .escapeChance = 0,
217 .airLiftChance = 0,
218 .hurricaneChance = 0,
219 .spookChance = 0,
220 .upAndAwayChance = 0,
221 .spinSmashReq = 4,
222 .powerBounceChance = 80,
223 .coinReward = 0,
224 .size = { 36, 29 },
225 .healthBarOffset = { 0, 0 },
226 .statusIconOffset = { -10, 22 },
227 .statusTextOffset = { 10, 22 },
228};
229
230EvtScript N(EVS_Init) = {
231 Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn)))
232 Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle)))
233 Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent)))
235 Return
236 End
237};
238
239EvtScript N(EVS_Idle) = {
240 Return
241 End
242};
243
244EvtScript N(EVS_HandleEvent) = {
260 SetConst(LVar0, PRT_MAIN)
266 Set(LVar2, 14)
272 Set(LVar2, 14)
285 Set(LVar2, 14)
291 SetConst(LVar0, PRT_MAIN)
294 Set(LVar3, 20)
299 SetConst(LVar0, PRT_MAIN)
302 Wait(10)
307 Return
308 End
309};
310
311EvtScript N(EVS_TakeTurn) = {
319 ExecWait(N(runAway))
323 Return
324 End
325};
326
329 Wait(36)
331 Return
332 End
333};
334
335EvtScript N(runAway) = {
336 SetConst(LVar0, PRT_MAIN)
339 Return
340 End
341};
342
352 Return
353 End
354};
355
361 IfNe(LVar0, 0)
363 EndIf
365 Return
366 End
367};
368
370 Call(ShowActionHud, true)
376 Return
381 ExecWait(N(smack))
383 ExecWait(N(smack))
385 ExecWait(N(smack))
391 ExecWait(N(spook))
395 Return
396 End
397};
398
403 Thread
404 Set(LVar0, 200)
405 Loop(20)
406 Sub(LVar0, 10)
408 Wait(1)
409 EndLoop
411 Wait(10)
417 Set(LVar0, 55)
418 Loop(20)
419 Add(LVar0, 10)
421 Wait(1)
422 EndLoop
424 Return
425 End
426};
427
432 Thread
433 Set(LVar0, 200)
434 Loop(20)
435 Sub(LVar0, 10)
437 Wait(1)
438 EndLoop
440 Wait(10)
446 Set(LVar0, 55)
447 Loop(20)
448 Add(LVar0, 10)
450 Wait(1)
451 EndLoop
453 Return
454 End
455};
456
457EvtScript N(80238EE0) = {
463 Return
464 End
465};
466
467EvtScript N(smack) = {
474 Call(SetupMashMeter, 4, 40, 70, 99, 100, 0)
475 Set(LVarB, 60 * DT)
476 Set(LVarC, 1)
478 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
479 Set(LVarB, 60 * DT)
480 Set(LVarC, 1)
482 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
483 Set(LVarB, 60 * DT)
484 Set(LVarC, 1)
486 Wait(10)
487 Thread
488 Wait(10)
489 Set(LVar0, LVarB)
490 Add(LVar0, -3)
498 Thread
500 Call(AddGoalPos, ACTOR_PARTNER, -15, -10, 0)
510 Wait(15)
512 Set(LVar0, 55)
513 Loop(5)
514 Add(LVar0, 40)
516 Wait(1)
517 EndLoop
521 Wait(20)
522 Set(LVarF, 0)
523 Set(LVarE, 0)
524 Set(LVarD, 0)
528 Loop(15)
530 Wait(1)
532 Wait(1)
533 EndLoop
536 Label(0)
541 Set(LVar0, 0)
542 Loop(20)
543 Add(LVar0, -45)
545 Wait(1)
546 EndLoop
550 Wait(30)
553 Wait(10)
555 Return
556 EndIf
557 Add(LVarE, 1)
559 Goto(2)
560 EndIf
561 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
564 Set(LFlag0, true)
566 Else
570 EndIf
571 Wait(2)
572 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
573 Thread
574 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
575 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
576 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
577 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
579 IfEq(LVarE, 1)
580 Call(N(GetBowSize))
583 Else
586 EndIf
588 IfEq(LVarE, 1)
589 IfGt(LVarB, 99)
591 Else
593 EndIf
594 Goto(1)
595 Else
596 IfGt(LVarB, 99)
598 Else
600 EndIf
601 Goto(1)
602 EndIf
603 Label(1)
604 Wait(8)
605 Add(LVarF, 10)
607 Goto(0)
608 Label(2)
609 IfEq(LVarE, 1)
610 Call(N(GetBowSize))
613 Else
616 EndIf
617 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
620 Set(LFlag0, true)
622 Else
626 EndIf
627 Wait(2)
628 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
632 CaseGt(99)
637 Wait(8)
650 Return
651 End
652};
653
658 Call(SetBattleCamTarget, -129, 28, 0)
662 Thread
664 Add(LVar1, 5)
668 Set(LVar0, 0)
669 Loop(10)
670 Add(LVar0, 18)
672 Wait(1)
673 EndLoop
674 Wait(10)
676 Add(LVar0, -30)
677 Add(LVar1, 30)
680 Thread
681 Set(LVar0, 180)
682 Loop(10)
683 Sub(LVar0, 18)
685 Wait(1)
686 EndLoop
688 Thread
689 Set(LVar0, 255)
690 Loop(30)
691 Sub(LVar0, 5)
693 Wait(1)
694 EndLoop
697 Call(N(ModifyBowPos), -10, 20)
698 Add(LVar2, 5)
702 IfEq(LVar0, 0)
704 EndIf
706 Set(LVar0, 255)
707 Loop(15)
708 Sub(LVar0, 10)
710 Wait(1)
711 EndLoop
712 Wait(15)
717 Return
718 End
719};
720
723 Wait(20)
725 Thread
726 Wait(10)
727 Set(LVar0, 105)
728 Loop(30)
729 Add(LVar0, 5)
731 Wait(1)
732 EndLoop
734 Thread
735 Set(LVar0, 105)
736 Loop(30)
737 Add(LVar0, 5)
739 Wait(1)
740 EndLoop
748 Wait(20)
749 Return
750 End
751};
752
753EvtScript N(spook) = {
756 Call(SetupMashMeter, 1, 100, 0, 0, 0, 0)
758 Wait(10)
759 Thread
768 Add(LVar0, 40)
769 Add(LVar1, 10)
772 Wait(15)
774 Thread
775 Wait(74)
776 Loop(8)
778 Wait(1)
780 Wait(1)
781 EndLoop
782 Loop(7)
784 Wait(1)
786 Wait(1)
787 EndLoop
788 Loop(8)
790 Wait(1)
792 Wait(1)
793 EndLoop
800 Set(LVar1, 0)
801 Set(LVar2, 0)
802 Loop(90 * DT)
804 CaseGt(80)
805 IfEq(LVar2, 7)
809 Set(LVar2, 8)
810 EndIf
811 CaseGt(70)
812 IfEq(LVar2, 6)
816 Set(LVar2, 7)
817 EndIf
818 CaseGt(60)
819 IfEq(LVar2, 5)
823 Set(LVar2, 6)
824 EndIf
825 CaseGt(50)
826 IfEq(LVar2, 4)
830 Set(LVar2, 5)
831 EndIf
832 CaseGt(40)
833 IfEq(LVar2, 3)
837 Set(LVar2, 4)
838 EndIf
839 CaseGt(30)
840 IfEq(LVar2, 2)
844 Set(LVar2, 3)
845 EndIf
846 CaseGt(20)
847 IfEq(LVar2, 1)
851 Set(LVar2, 2)
852 EndIf
853 CaseGt(10)
854 IfEq(LVar2, 0)
858 Set(LVar2, 1)
859 EndIf
861 Add(LVar1, 1)
862 Wait(1)
863 EndLoop
867 Thread
870 Wait(5)
872 Loop(5)
874 Wait(2)
876 Wait(2)
877 EndLoop
879 Thread
880 Set(LVar0, 255)
881 Loop(15)
882 Sub(LVar0, 10)
884 Wait(1)
885 EndLoop
888 SetF(LVar0, Float(1.0))
891 CaseLe(20)
892 SetF(LVar1, Float(0.3))
893 CaseLe(40)
894 SetF(LVar1, Float(0.4))
895 CaseLe(60)
896 SetF(LVar1, Float(0.5))
897 CaseLe(80)
898 SetF(LVar1, Float(0.6))
900 SetF(LVar1, Float(0.7))
902 Loop(5)
905 Wait(1)
906 EndLoop
908 Thread
909 Loop(5)
910 Loop(3)
911 SubF(LVar0, Float(0.23))
913 Wait(1)
914 EndLoop
915 Loop(3)
916 AddF(LVar0, Float(0.23))
918 Wait(1)
919 EndLoop
920 EndLoop
923 Add(LVar1, 32)
926 Wait(15)
929 Loop(0)
932 IfEq(LVar0, 6)
933 Goto(10)
934 EndIf
937 CaseGt(99)
942 Label(10)
943 Wait(5)
947 EndIf
948 EndLoop
951 CaseGt(99)
956 Wait(30)
957 Thread
958 Set(LVar0, 105)
959 Loop(15)
960 Add(LVar0, 10)
962 Wait(1)
963 EndLoop
967 CaseLe(20)
968 SetF(LVar1, Float(0.3))
969 CaseLe(40)
970 SetF(LVar1, Float(0.4))
971 CaseLe(60)
972 SetF(LVar1, Float(0.5))
973 CaseLe(80)
974 SetF(LVar1, Float(0.6))
976 SetF(LVar1, Float(0.7))
979 Loop(5)
982 Wait(1)
983 EndLoop
984 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
986 ExecWait(N(80238EE0))
987 Return
988 End
989};
990
991EvtScript N(fanSmack) = {
995 Call(SetupMashMeter, 5, 35, 60, 80, 99, 100)
996 Set(LVarB, 90 * DT)
997 Set(LVarC, 2)
998 Wait(10)
999 Thread
1000 Wait(10)
1001 Set(LVar0, LVarB)
1002 Add(LVar0, -3)
1005 EndThread
1010 Thread
1012 Call(AddGoalPos, ACTOR_PARTNER, -25, -10, 0)
1014 EndThread
1021 Wait(15)
1023 Set(LVar0, 55)
1024 Loop(5)
1025 Add(LVar0, 40)
1027 Wait(1)
1028 EndLoop
1032 Wait(20)
1033 Set(LVarF, 0)
1034 Set(LVarE, 0)
1035 Set(LVarD, 0)
1036 Set(LFlag0, false)
1040 Loop(30)
1042 Wait(1)
1044 Wait(1)
1045 EndLoop
1048 Label(0)
1053 Set(LVar0, 0)
1054 Loop(15)
1055 Add(LVar0, -45)
1057 Wait(1)
1058 EndLoop
1059 Loop(15)
1060 Add(LVar0, -90)
1062 Wait(1)
1063 EndLoop
1067 Wait(40)
1070 Wait(10)
1072 Return
1073 EndIf
1074 Add(LVarE, 1)
1075 IfGt(LVarE, LVarD)
1076 Goto(2)
1077 EndIf
1078 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
1079 IfEq(LFlag0, false)
1081 Set(LFlag0, true)
1083 Else
1085 Set(LFlag0, false)
1087 EndIf
1088 Wait(2)
1089 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1090 Thread
1091 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
1092 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
1093 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
1094 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
1095 EndThread
1096 IfEq(LVarE, 1)
1097 Call(N(GetBowSize))
1100 Else
1103 EndIf
1105 PlayEffect(EFFECT_CONFETTI, 5, LVar0, LVar1, LVar2, Float(1.0), 20, 0)
1107 IfEq(LVarE, 1)
1108 IfGt(LVarB, 99)
1110 Else
1112 EndIf
1113 Goto(1)
1114 Else
1115 IfGt(LVarB, 99)
1117 Else
1119 EndIf
1120 Goto(1)
1121 EndIf
1122 Label(1)
1123 IfEq(LVarE, 1)
1124 Set(LVar0, 0)
1125 Loop(8)
1126 Add(LVar0, 144)
1128 Wait(1)
1129 EndLoop
1130 Else
1131 Set(LVar0, 0)
1132 Loop(8)
1133 Sub(LVar0, 144)
1135 Wait(1)
1136 EndLoop
1137 EndIf
1139 Add(LVarF, 10)
1141 Goto(0)
1142 Label(2)
1143 Thread
1144 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
1145 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
1146 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5))
1147 Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2))
1148 EndThread
1149 IfEq(LVarE, 1)
1150 Call(N(GetBowSize))
1153 Else
1156 EndIf
1157 Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0))
1158 IfEq(LFlag0, false)
1160 Set(LFlag0, true)
1162 Else
1164 Set(LFlag0, false)
1166 EndIf
1167 Wait(2)
1168 Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0))
1171 Switch(LVar0)
1172 CaseGt(99)
1176 EndSwitch
1177 Thread
1178 IfEq(LVarE, 1)
1179 Set(LVar0, 0)
1180 Loop(8)
1181 Add(LVar0, 144)
1183 Wait(1)
1184 EndLoop
1185 Else
1186 Set(LVar0, 0)
1187 Loop(8)
1188 Sub(LVar0, 144)
1190 Wait(1)
1191 EndLoop
1192 EndIf
1193 IfEq(LVarE, 1)
1194 Set(LVar0, 0)
1195 Loop(8)
1196 Add(LVar0, 72)
1198 Wait(1)
1199 EndLoop
1200 Else
1201 Set(LVar0, 0)
1202 Loop(8)
1203 Sub(LVar0, 72)
1205 Wait(1)
1206 EndLoop
1207 EndIf
1209 EndThread
1210 Switch(LVar0)
1213 Wait(10)
1217 CaseOrEq(1)
1218 CaseOrEq(3)
1219 Wait(10)
1223 EndSwitch
1224 Return
1225 End
1226};
1227
BSS s32 PopupMenu_SelectedIndex
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
s32 bMarioHideAnims[]
Definition actors.c:76
u32 * idleAnimations
f32 scalingFactor
struct ActorPart * partsTable
struct SelectableTarget targetData[24]
s16 targetActorID
Bytecode EvtScript[]
s8 targetListLength
@ BTL_CAM_XADJ_NONE
Definition enums.h:4484
@ ACTION_COMMAND_SPOOK
Definition enums.h:3527
@ ACTION_COMMAND_SMACK
Definition enums.h:3524
@ 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
@ BS_FLAGS1_4000
Definition enums.h:3616
@ ELEMENT_END
Definition enums.h:2147
@ ELEMENT_NORMAL
Definition enums.h:2148
@ ITER_NO_MORE
Definition enums.h:2063
@ ITER_NEXT
Definition enums.h:2058
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
Definition enums.h:3408
@ ACTOR_DECORATION_SEEING_STARS
Definition enums.h:2079
@ PHASE_RUN_AWAY_START
Definition enums.h:2093
@ PHASE_EXECUTE_ACTION
Definition enums.h:2091
@ PHASE_ENEMY_BEGIN
Definition enums.h:2101
@ PHASE_CELEBRATE
Definition enums.h:2095
@ PHASE_RUN_AWAY_FAIL
Definition enums.h:2097
@ BTL_MENU_TYPE_STAR_POWERS
Definition enums.h:3834
@ BS_FLAGS2_PLAYER_TURN_USED
Definition enums.h:3638
@ STATUS_KEY_PARALYZE
Definition enums.h:2806
@ STATUS_TURN_MOD_DEFAULT
Definition enums.h:2832
@ STATUS_TURN_MOD_PARALYZE
Definition enums.h:2839
@ STATUS_KEY_FROZEN
Definition enums.h:2808
@ STATUS_TURN_MOD_SLEEP
Definition enums.h:2833
@ STATUS_TURN_MOD_DIZZY
Definition enums.h:2837
@ STATUS_TURN_MOD_UNUSED
Definition enums.h:2836
@ STATUS_KEY_TRANSPARENT
Definition enums.h:2815
@ STATUS_KEY_STATIC
Definition enums.h:2812
@ STATUS_END
Definition enums.h:2801
@ STATUS_KEY_KO
Definition enums.h:2814
@ STATUS_TURN_MOD_POISON
Definition enums.h:2838
@ STATUS_TURN_MOD_STOP
Definition enums.h:2842
@ STATUS_KEY_SLEEP
Definition enums.h:2807
@ STATUS_KEY_UNUSED
Definition enums.h:2804
@ STATUS_KEY_STONE
Definition enums.h:2813
@ STATUS_KEY_STOP
Definition enums.h:2809
@ STATUS_KEY_INACTIVE
Definition enums.h:2819
@ STATUS_TURN_MOD_FROZEN
Definition enums.h:2835
@ STATUS_KEY_SHRINK
Definition enums.h:2811
@ STATUS_KEY_DIZZY
Definition enums.h:2805
@ STATUS_KEY_POISON
Definition enums.h:2810
@ STATUS_TURN_MOD_STATIC
Definition enums.h:2834
@ STATUS_KEY_NORMAL
Definition enums.h:2802
@ STATUS_TURN_MOD_SHRINK
Definition enums.h:2840
@ STATUS_KEY_DEFAULT
Definition enums.h:2803
@ 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_RETURN_HOME
Definition enums.h:4411
@ BTL_CAM_DEFAULT
Definition enums.h:4409
@ BTL_CAM_INTERRUPT
Definition enums.h:4408
@ BTL_CAM_REPOSITION
Definition enums.h:4426
@ BTL_CAM_ACTOR_CLOSE
Definition enums.h:4420
@ BTL_CAM_ACTOR_FAR
Definition enums.h:4422
@ BTL_CAM_PARTNER_MISTAKE
Definition enums.h:4458
@ SUPPRESS_EVENT_SPIKY_TOP
Definition enums.h:2934
@ SUPPRESS_EVENT_ALT_SPIKY
Definition enums.h:2939
@ SUPPRESS_EVENT_SPIKY_FRONT
Definition enums.h:2936
@ SUPPRESS_EVENT_BURN_CONTACT
Definition enums.h:2938
@ EASING_COS_IN_OUT
Definition enums.h:520
@ EASING_LINEAR
Definition enums.h:510
@ STATUS_FLAG_FEAR
Definition enums.h:2856
@ DMG_SRC_NEXT_SLAP_RIGHT
Definition enums.h:2025
@ DMG_SRC_LAST_SLAP_RIGHT
Definition enums.h:2027
@ DMG_SRC_NEXT_FAN_SMACK_LEFT
Definition enums.h:2028
@ DMG_SRC_LAST_FAN_SMACK_LEFT
Definition enums.h:2030
@ DMG_SRC_NEXT_SLAP_LEFT
Definition enums.h:2024
@ DMG_SRC_NEXT_FAN_SMACK_RIGHT
Definition enums.h:2029
@ DMG_SRC_SPOOK
Definition enums.h:2032
@ DMG_SRC_LAST_SLAP_LEFT
Definition enums.h:2026
@ DMG_SRC_LAST_FAN_SMACK_RIGHT
Definition enums.h:2031
@ SOUND_NO_DAMGE
Definition enums.h:1436
@ SOUND_BOW_APPEAR
Definition enums.h:1327
@ SOUND_BOW_SMACK
Definition enums.h:1337
@ SOUND_BOO_VANISH_A
Definition enums.h:695
@ SOUND_BOW_SPOOK
Definition enums.h:1011
@ SOUND_BOW_FAN_SMACK
Definition enums.h:1338
@ SOUND_BOO_APPEAR_A
Definition enums.h:697
@ SOUND_BOW_VANISH
Definition enums.h:1326
@ ACTOR_PLAYER
Definition enums.h:2118
@ ACTOR_PARTNER
Definition enums.h:2119
@ ACTOR_SELF
Definition enums.h:2117
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
Definition enums.h:3363
@ ACTOR_FLAG_NO_INACTIVE_ANIM
Definition enums.h:3379
@ ACTOR_FLAG_USING_IDLE_ANIM
Definition enums.h:3376
@ CAM_PARAM_FOV_SCALE
Definition enums.h:1842
@ BTL_CAM_YADJ_NONE
Definition enums.h:4491
@ EVENT_HIT
Definition enums.h:2165
@ EVENT_33
Definition enums.h:2202
@ EVENT_BURN_HIT
Definition enums.h:2169
@ EVENT_SPIKE_CONTACT
Definition enums.h:2196
@ EVENT_IMMUNE
Definition enums.h:2179
@ EVENT_ZERO_DAMAGE
Definition enums.h:2177
@ EVENT_BLOCK
Definition enums.h:2180
@ EVENT_18
Definition enums.h:2178
@ EVENT_HIT_COMBO
Definition enums.h:2164
@ EVENT_RECOVER_FROM_KO
Definition enums.h:2203
@ EVENT_SHOCK_HIT
Definition enums.h:2198
@ EVENT_BURN_CONTACT
Definition enums.h:2197
@ CAM_BATTLE
Definition enums.h:1827
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2914
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2912
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2913
#define ApiStatus_DONE2
Definition evt.h:119
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1730
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:923
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:296
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#define Ref(sym)
Address/pointer constant.
Definition macros.h:61
#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 Sub(VAR, INT_VALUE)
Definition macros.h:378
#define LVarF
Definition macros.h:164
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:273
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define Add(VAR, INT_VALUE)
Definition macros.h:377
#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 Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:233
#define LVarC
Definition macros.h:161
#define ARRAY_COUNT(arr)
Definition macros.h:39
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:279
#define Float(DOUBLE)
Definition macros.h:52
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:228
#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 CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define LVarB
Definition macros.h:160
#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 Thread
Marks the start of a thread block.
Definition macros.h:545
#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:332
#define EndThread
Marks the end of a thread block.
Definition macros.h:548
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:374
#define LVar2
Definition macros.h:151
#define DT
Definition macros.h:534
#define LVar1
Definition macros.h:150
#define LFlag0
Definition macros.h:168
#define LVarD
Definition macros.h:162
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define SubF(VAR, FLOAT_VALUE)
Definition macros.h:385
#define PlayEffect(args...)
Definition macros.h:811
#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 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 LVar3
Definition macros.h:152
#define LVarE
Definition macros.h:163
#define LVar0
Definition macros.h:149
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:371
#define Return
Kills the current EVT thread.
Definition macros.h:218
@ ACV_SMACK_HAND
Definition smack.h:18
@ ACV_SMACK_FAN
Definition smack.h:19
struct Actor * playerActor
BattleStatus gBattleStatus
Definition battle.cpp:14
u32 bMarioIdleAnims[]
Definition actors.c:30