Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
pokey.inc.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"
5#include "sprite/npc/Pokey.h"
6
7#define NAMESPACE A(pokey)
8
9// while these parts seem set up to manage Pokeys changing size, its actually all handled via animations
10// and the PRT_BODY* are always invisible
11enum N(ActorPartIDs) {
12 PRT_MAIN = 1, // top part of a 4-part Pokey
13 PRT_BODY3 = 2, // bottom part of a 4-part Pokey
14 PRT_BODY2 = 3,
15 PRT_BODY1 = 4,
16 PRT_SINGLE = 5, // single-part Pokey
17 PRT_PROJECTILE = 6, // part which is thrown
18};
19
20enum N(ActorVars) {
24 AVAR_Anim_Run = 2,
25 AVAR_Anim_Hit = 3,
31 AVAR_Generation = 10, // Pokeys from the initial formation are generation 0, their summons are generation 1, and so on. generation 2 cannot summon.
32
36};
37
38enum N(ActorParams) {
42 DMG_THROW_PART = 2, // throw a body part at the player
43 DMG_LEAP = 2, // jump onto the player, used when no more parts can be thrown
44};
45
46extern s32 N(FourPartAnims)[];
47extern s32 N(ThrownPartAnims)[];
48extern EvtScript N(EVS_Init);
49extern EvtScript N(EVS_Idle);
51extern EvtScript N(EVS_TakeTurn);
58extern EvtScript N(EVS_Pokey_Hit);
60
61s32 N(DefenseTable)[] = {
64};
65
66s32 N(StatusTable)[] = {
77 STATUS_KEY_STOP, 100,
89};
90
92 {
94 .index = PRT_MAIN,
95 .posOffset = { 0, 0, 0 },
96 .targetOffset = { 0, 20 },
97 .opacity = 255,
98 .idleAnimations = N(FourPartAnims),
99 .defenseTable = N(DefenseTable),
101 .elementImmunityFlags = 0,
102 .projectileTargetOffset = { 0, 0 },
103 },
104 {
106 .index = PRT_BODY3,
107 .posOffset = { 0, 0, 0 },
108 .targetOffset = { 0, 72 },
109 .opacity = 255,
110 .idleAnimations = NULL,
111 .defenseTable = N(DefenseTable),
113 .elementImmunityFlags = 0,
114 .projectileTargetOffset = { 0, -8 },
115 },
116 {
118 .index = PRT_BODY2,
119 .posOffset = { 0, 0, 0 },
120 .targetOffset = { 0, 54 },
121 .opacity = 255,
122 .idleAnimations = NULL,
123 .defenseTable = N(DefenseTable),
125 .elementImmunityFlags = 0,
126 .projectileTargetOffset = { 0, -8 },
127 },
128 {
130 .index = PRT_BODY1,
131 .posOffset = { 0, 0, 0 },
132 .targetOffset = { 0, 36 },
133 .opacity = 255,
134 .idleAnimations = NULL,
135 .defenseTable = N(DefenseTable),
137 .elementImmunityFlags = 0,
138 .projectileTargetOffset = { 0, -8 },
139 },
140 {
142 .index = PRT_SINGLE,
143 .posOffset = { 0, 0, 0 },
144 .targetOffset = { 0, 16 },
145 .opacity = 255,
146 .idleAnimations = NULL,
147 .defenseTable = N(DefenseTable),
149 .elementImmunityFlags = 0,
150 .projectileTargetOffset = { 0, -8 },
151 },
152 {
154 .index = PRT_PROJECTILE,
155 .posOffset = { 0, 0, 0 },
156 .targetOffset = { 0, 0 },
157 .opacity = 255,
158 .idleAnimations = N(ThrownPartAnims),
159 .defenseTable = N(DefenseTable),
161 .elementImmunityFlags = 0,
162 .projectileTargetOffset = { 0, 0 },
163 },
164};
165
166ActorBlueprint NAMESPACE = {
167 .flags = 0,
168 .type = ACTOR_TYPE_POKEY,
169 .level = ACTOR_LEVEL_POKEY,
170 .maxHP = 4,
171 .partCount = ARRAY_COUNT(N(ActorParts)),
172 .partsData = N(ActorParts),
173 .initScript = &N(EVS_Init),
174 .statusTable = N(StatusTable),
175 .escapeChance = 70,
176 .airLiftChance = 90,
177 .hurricaneChance = 85,
178 .spookChance = 70,
179 .upAndAwayChance = 95,
180 .spinSmashReq = 0,
181 .powerBounceChance = 100,
182 .coinReward = 1,
183 .size = { 24, 80 },
184 .healthBarOffset = { 0, 0 },
185 .statusIconOffset = { -15, 75 },
186 .statusTextOffset = { 10, 65 },
187};
188
189s32 N(FourPartAnims)[] = {
198};
199
200s32 N(ThreePartAnims)[] = {
209};
210
211s32 N(TwoPartAnims)[] = {
220};
221
222s32 N(OnePartAnims)[] = {
231};
232
233s32 N(ThrownPartAnims)[] = {
236};
237
238EvtScript N(EVS_Init) = {
243 // copy input var from Formation
256 Return
257 End
258};
259
260EvtScript N(EVS_Idle) = {
261 Return
262 End
263};
264
280 Else
282 IfEq(LVarA, 3)
286 Else
299 EndIf
300 EndIf
307 Wait(10)
308 Else
310 IfEq(LVarA, 3)
314 Wait(10)
315 Else
327 Wait(10)
329 EndIf
330 EndIf
334 Return
342 Else
344 IfEq(LVarA, 3)
346 Else
357 EndIf
358 EndIf
366 Else
368 IfEq(LVarA, 3)
370 Else
381 EndIf
382 EndIf
386 Return
394 Return
401 Else
403 EndIf
410 Else
412 EndIf
414 SetConst(LVar1, -1)
416 Return
437 Return
447 CaseEq(0)
448 Set(LVar0, 0)
449 Set(LVar1, 77)
451 CaseEq(1)
452 Set(LVar0, 0)
453 Set(LVar1, 59)
455 CaseEq(2)
456 Set(LVar0, 0)
457 Set(LVar1, 41)
459 CaseEq(3)
460 Set(LVar0, 0)
461 Set(LVar1, 23)
467 EndIf
471 MulF(LVar0, Float(0.4))
472 MulF(LVar1, Float(0.4))
473 EndIf
477 Wait(30)
484 Return
489 Return
490 End
491};
492
503 CaseEq(0)
506 Call(AddGoalPos, ACTOR_SELF, 60, 0, 0)
507 Else
508 Call(AddGoalPos, ACTOR_SELF, 24, 0, 0)
509 EndIf
514 CaseEq(1)
517 Call(AddGoalPos, ACTOR_SELF, 40, 0, 0)
518 Else
519 Call(AddGoalPos, ACTOR_SELF, 16, 0, 0)
520 EndIf
525 CaseEq(2)
528 Call(AddGoalPos, ACTOR_SELF, 20, 0, 0)
529 Else
530 Call(AddGoalPos, ACTOR_SELF, 8, 0, 0)
531 EndIf
538 Call(MakeLerp, 0, -40, 20, EASING_COS_IN_OUT)
539 Label(0)
542 Wait(1)
543 IfEq(LVar1, 1)
544 Goto(0)
545 EndIf
547 Wait(3)
550 Call(MakeLerp, -40, 90, 5, EASING_QUADRATIC_IN)
551 Label(3)
554 Wait(1)
555 IfEq(LVar1, 1)
556 Goto(3)
557 EndIf
562 Set(LVarA, LVar0)
563 Call(MakeLerp, 90, 0, 5, EASING_LINEAR)
564 Label(4)
567 Wait(1)
568 IfEq(LVar1, 1)
569 Goto(4)
570 EndIf
573 EndIf
579 CaseEq(0)
585 CaseEq(1)
591 CaseEq(2)
601 Return
603 // damage *could* depend on size of the Pokey, but all DMG values are the same, so it doesn't
606 CaseEq(0)
608 CaseEq(1)
614 Wait(2)
620 Call(MakeLerp, 90, 0, 10, EASING_LINEAR)
621 Label(5)
624 Wait(1)
625 IfEq(LVar1, 1)
626 Goto(5)
627 EndIf
631 CaseEq(0)
637 CaseEq(1)
643 CaseEq(2)
654 Return
655 End
656};
657
658// (out) LVar9 : number of Pokey actors that aren't disabled, haven't thrown parts, and aren't last-generation
660 Set(LVar9, 0)
663 Label(0)
671 IfEq(LVar3, 0)
674 Add(LVar9, 1)
675 EndIf
676 EndIf
677 EndIf
681 Goto(0)
682 EndIf
683 Return
684 End
685};
686
688 #define LBL_NO_SUMMON 123
690 IfEq(LVarA, 3)
692 Return
693 EndIf
695 IfEq(LVar0, 0)
699 EndIf
701 IfEq(LVarE, -1)
703 EndIf
706 CaseEq(1)
707 Call(RandInt, 1000, LVar0)
708 IfLt(LVar0, 400)
710 Return
711 EndIf
712 CaseEq(2)
713 Call(RandInt, 1000, LVar0)
714 IfLt(LVar0, 200)
716 Return
717 EndIf
718 CaseEq(3)
719 Call(RandInt, 1000, LVar0)
720 IfLt(LVar0, 100)
722 Return
723 EndIf
725 EndIf
726 // try other moves
728 Call(RandInt, 1000, LVar0)
729 IfLt(LVar0, 500)
731 Return
732 EndIf
733 // throw a body part
740 EndIf
745 Else
747 EndIf
757 CaseEq(0)
759 Add(LVar1, 38)
760 Else
761 Add(LVar1, 15)
763 EndIf
765 CaseEq(1)
767 Add(LVar1, 20)
768 Else
769 Add(LVar1, 8)
771 EndIf
773 CaseEq(2)
775 Add(LVar1, 8)
776 Else
777 Add(LVar1, 3)
779 EndIf
781 CaseEq(3)
787 Wait(12)
790 Wait(1)
792 Wait(3)
801 Wait(5)
804 EndIf
808 Sub(LVar0, 80)
809 Sub(LVar1, 5)
817 Return
834 Sub(LVar0, 55)
835 Set(LVar1, 0)
840 Sub(LVar0, 24)
843 Sub(LVar0, 20)
850 Return
851 End
852};
853
855 Set(LVarE, -1)
858 Return
859 EndIf
861 IfNe(LVar0, 0)
862 Return
863 EndIf
864 // check if each column is occupied
871 Label(0)
874 Mod(LVar5, 4)
876 CaseEq(0)
877 Set(LFlag1, TRUE)
878 CaseEq(1)
879 Set(LFlag2, TRUE)
880 CaseEq(2)
881 Set(LFlag3, TRUE)
882 CaseEq(3)
883 Set(LFlag4, TRUE)
887 Goto(0)
888 EndIf
889 // only summon if space in front of the Pokey is available, and never if Pokey is in front position
893 Return // can't summon if Pokey is in front
897 EndIf
901 EndIf
905 EndIf
907 Return
908 End
909};
910
911Vec3i N(SummonPos) = { 400, -100, 0 };
912
914 ACTOR_BY_POS(NAMESPACE, N(SummonPos), 100),
915};
916
925 // lean back slightly
926 Call(MakeLerp, 0, -20, 20, EASING_COS_IN_OUT)
927 Label(0)
930 Wait(1)
931 IfEq(LVar1, 1)
932 Goto(0)
933 EndIf
935 Wait(8)
938 // lean forward
939 Call(MakeLerp, -20, 30, 20, EASING_COS_IN_OUT)
940 Label(1)
943 Wait(1)
944 IfEq(LVar1, 1)
945 Goto(1)
946 EndIf
948 Wait(6)
951 // lean back
952 Call(MakeLerp, 30, -40, 20, EASING_COS_IN_OUT)
953 Label(2)
956 Wait(1)
957 IfEq(LVar1, 1)
958 Goto(2)
959 EndIf
961 Wait(4)
964 // smash into ground
965 Call(MakeLerp, -40, 90, 10, EASING_COS_IN_OUT)
966 Label(3)
969 Wait(1)
970 IfEq(LVar1, 1)
971 Goto(3)
972 EndIf
973 Wait(20)
974 // create new Pokey actor
977 Thread
978 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0))
981 Set(LVarB, LVar0)
983 Sub(LVar0, 40)
984 Sub(LVar1, 80)
994 Wait(20)
1001 // set generation of child to parent generation + 1
1003 Switch(LVar1)
1008 EndSwitch
1011 Set(LVarA, LVar0)
1012 // pull back and overshoot
1013 Call(MakeLerp, 90, -30, 7, EASING_QUADRATIC_OUT)
1014 Label(4)
1017 Wait(1)
1018 IfEq(LVar1, 1)
1019 Goto(4)
1020 EndIf
1021 Wait(20)
1022 // correct overshoot
1023 Call(MakeLerp, -30, 0, 10, EASING_COS_IN_OUT)
1024 Label(5)
1027 Wait(1)
1028 IfEq(LVar1, 1)
1029 Goto(5)
1030 EndIf
1031 Wait(20)
1035 Return
1036 End
1037};
1038
1050 Add(LVar0, 50)
1051 Set(LVar1, 0)
1058 Wait(4)
1060 Wait(1)
1062 Wait(4)
1066 Switch(LVar0)
1069 Set(LVarA, LVar0)
1072 Sub(LVar0, 5)
1073 Set(LVar1, 10)
1077 Wait(2)
1078 Set(LVar0, 0)
1079 Loop(5)
1080 Add(LVar0, 30)
1082 Wait(1)
1083 EndLoop
1088 EndIf
1091 Wait(2)
1092 Set(LVar0, 180)
1093 Loop(6)
1094 Add(LVar0, 30)
1095 IfEq(LVar0, 360)
1096 Set(LVar0, 0)
1097 EndIf
1099 Wait(1)
1100 EndLoop
1105 Sub(LVar0, 30)
1106 Set(LVar1, 0)
1109 Wait(15)
1121 Return
1123 EndSwitch
1127 Wait(2)
1128 Set(LVar0, 0)
1129 Loop(5)
1130 Add(LVar0, 30)
1132 Wait(1)
1133 EndLoop
1136 Wait(2)
1139 Switch(LVar0)
1146 Add(LVar0, 40)
1147 Set(LVar1, 0)
1151 Add(LVar0, 30)
1154 Add(LVar0, 20)
1157 Sub(LVar0, 10)
1167 EndSwitch
1170 Return
1171 End
1172};
1173
1180 Return
1181 EndIf
1183 Switch(LVarA)
1184 CaseEq(0)
1186 CaseEq(1)
1188 CaseEq(2)
1190 CaseEq(3)
1194 EndSwitch
1195 Return
1196 End
1197};
1198
1199#include "common/battle/SetAbsoluteStatusOffsets.inc.c"
1200
1201// set actor vars for new size one unit smaller than previous
1204 Switch(LVarA)
1205 CaseEq(0)
1221 Call(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45)
1222 CaseEq(1)
1238 Call(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25)
1239 CaseEq(2)
1253 Call(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5)
1254 EndSwitch
1255 Return
1256 End
1257};
1258
1261 Add(LVar1, 18)
1264 Set(LVar3, LVar1)
1265 Wait(2)
1266 Sub(LVar3, 1)
1268 Wait(3)
1269 Sub(LVar3, 2)
1271 Wait(2)
1272 Sub(LVar3, 3)
1274 Wait(1)
1275 Sub(LVar3, 5)
1277 Wait(1)
1278 Sub(LVar3, 7)
1280 Wait(1)
1281 Add(LVar3, 2)
1283 Wait(1)
1284 Add(LVar3, 3)
1286 Wait(1)
1287 Add(LVar3, 3)
1289 Wait(1)
1290 Sub(LVar3, 3)
1292 Wait(1)
1293 Sub(LVar3, 3)
1295 Wait(1)
1296 Sub(LVar3, 2)
1298 Return
1299 End
1300};
1301
1309 Else
1311 EndIf
1317 Wait(4)
1322 Label(0)
1325 IfNe(LVar1, LVar0)
1327 Goto(0)
1328 EndIf
1329 Label(1)
1330 Add(LVarF, 1)
1333 Goto(10)
1334 EndIf
1338 Goto(1)
1339 EndIf
1344 Set(LVar1, 0)
1349 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0))
1354 Goto(1)
1355 Label(10)
1359 Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE)
1362 Return
1363 End
1364};
1365
1370 Else
1372 EndIf
1376 Switch(LVar1)
1384 EndSwitch
1387 Wait(4)
1391 IfNe(LVarA, 3)
1397 Add(LVar0, 30)
1398 Set(LVar1, 0)
1400 Add(LVar0, 20)
1402 Loop(20)
1404 Wait(1)
1406 Wait(1)
1407 EndLoop
1410 Else
1411 Wait(30)
1412 EndIf
1414 Switch(LVar0)
1420 Div(LVar3, 2)
1421 Add(LVar1, LVar3)
1422 Add(LVar2, 5)
1423 DivF(LVar3, Float(10.0))
1428 Wait(10)
1430 EndSwitch
1431 Return
1432 End
1433};
1434
1442 Set(LVarD, LVarB)
1443 Add(LVarD, 40)
1447 Wait(20)
1450 Wait(20)
1452 Wait(5)
1454 Switch(LVar2)
1455 CaseEq(0)
1456 Set(LVar2, 96)
1457 Set(LVar6, 4)
1458 CaseEq(1)
1459 Set(LVar2, 72)
1460 Set(LVar6, 3)
1461 CaseEq(2)
1462 Set(LVar2, 48)
1463 Set(LVar6, 2)
1465 Set(LVar2, 24)
1466 Set(LVar6, 1)
1467 EndSwitch
1470 Loop(LVar6)
1472 Wait(10)
1473 EndLoop
1477 Sub(LVar4, LVar2)
1480 Wait(8)
1484 Return
1485 End
1486};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
#define STATUS_FLAGS_IMMOBILIZED
Definition enums.h:2834
@ BTL_CAM_XADJ_AVG
Definition enums.h:4899
@ ACTOR_SOUND_WALK
Definition enums.h:2034
@ ACTOR_SOUND_JUMP
Definition enums.h:2036
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3570
@ 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_ALT_SPIKY
Additional spiky quality associated with Pokeys and Spinies.
Definition enums.h:3388
@ ACTOR_EVENT_FLAG_SPIKY_TOP
Player takes spike damage from jump attacks.
Definition enums.h:3373
@ ACTOR_DECORATION_SWEAT
Definition enums.h:2045
@ PHASE_FIRST_STRIKE
Definition enums.h:2059
@ 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_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_DEFAULT
Definition enums.h:2198
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_LUCKY
Definition enums.h:1955
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_ACTOR
Definition enums.h:4835
@ BTL_CAM_ENEMY_APPROACH
Definition enums.h:4884
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4824
@ TARGET_FLAG_PRIMARY_ONLY
Definition enums.h:1863
@ TARGET_FLAG_ALLOW_TARGET_ONLY
Definition enums.h:1864
@ TARGET_FLAG_GROUND
Definition enums.h:1851
@ TARGET_FLAG_2
Definition enums.h:1850
@ EASING_QUADRATIC_IN
Definition enums.h:511
@ EASING_COS_IN_OUT
Definition enums.h:520
@ EASING_QUADRATIC_OUT
Definition enums.h:514
@ EASING_LINEAR
Definition enums.h:510
@ IDLE_SCRIPT_ENABLE
Definition enums.h:6407
@ IDLE_SCRIPT_DISABLE
Definition enums.h:6406
@ STATUS_FLAG_SHRINK
Definition enums.h:2819
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ STATUS_FLAG_POISON
Definition enums.h:2817
@ DMG_SRC_POWER_SHELL
Definition enums.h:1995
@ DMG_SRC_FIRE_SHELL
Definition enums.h:1997
@ DMG_SRC_SHELL_TOSS
Definition enums.h:1994
@ SOUND_POKEY_REACH_DOWN
Definition enums.h:1072
@ SOUND_POKEY_LEAN_FORWARD
Definition enums.h:1148
@ SOUND_NONE
Definition enums.h:547
@ SOUND_POKEY_EMERGE_FROM_GROUND
Definition enums.h:1150
@ SOUND_POKEY_THROW
Definition enums.h:1040
@ SOUND_POKEY_SWAY
Definition enums.h:1146
@ SOUND_POKEY_STEP
Definition enums.h:1070
@ SOUND_POKEY_LEAN_BACK
Definition enums.h:1149
@ SOUND_POKEY_SMASH
Definition enums.h:1071
@ BTL_RUMBLE_PLAYER_HEAVY
Definition enums.h:4260
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_FLAG_TARGET_ONLY
Battle ends even if undefeated. No turn.
Definition enums.h:3334
@ BTL_CAM_YADJ_TARGET
Definition enums.h:4904
@ EVENT_HIT
Definition enums.h:2132
@ EVENT_SPIN_SMASH_LAUNCH_HIT
Definition enums.h:2138
@ EVENT_SCARE_AWAY
Definition enums.h:2174
@ EVENT_BURN_HIT
Definition enums.h:2136
@ EVENT_IMMUNE
Definition enums.h:2146
@ EVENT_BURN_DEATH
Definition enums.h:2157
@ EVENT_ZERO_DAMAGE
Definition enums.h:2144
@ EVENT_SHOCK_DEATH
Definition enums.h:2159
@ EVENT_SPIN_SMASH_HIT
Definition enums.h:2133
@ EVENT_SPIN_SMASH_DEATH
Definition enums.h:2154
@ EVENT_HIT_COMBO
Definition enums.h:2131
@ EVENT_SPIKE_TAUNT
Definition enums.h:2148
@ EVENT_DEATH
Definition enums.h:2153
@ EVENT_SPIN_SMASH_LAUNCH_DEATH
Definition enums.h:2158
@ EVENT_SHOCK_HIT
Definition enums.h:2165
@ EVENT_RECOVER_STATUS
Definition enums.h:2167
@ ACTOR_PART_FLAG_PRIMARY_TARGET
Definition enums.h:3362
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
Definition enums.h:3361
@ ACTOR_PART_FLAG_NO_TARGET
Cannot be targeted.
Definition enums.h:3360
@ ACTOR_PART_FLAG_INVISIBLE
Definition enums.h:3350
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_TRIGGER_LUCKY
Definition enums.h:2881
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
EvtScript EVS_Enemy_HopToPos
EvtScript EVS_Enemy_Hit
EvtScript EVS_Enemy_Death
EvtScript EVS_Enemy_SpinSmashHit
EvtScript EVS_Enemy_ShockHit
EvtScript EVS_Enemy_Recover
EvtScript EVS_Enemy_BurnHit
EvtScript EVS_Enemy_NoDamageHit
#define LBL_NO_SUMMON
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus RandInt(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(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 LVar6
Definition macros.h:154
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#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 LFlag4
Definition macros.h:171
#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 Mod(VAR, INT_VALUE)
Definition macros.h:380
#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 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 LFlag1
Definition macros.h:168
#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 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 IfFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR,...
Definition macros.h:288
#define LVar2
Definition macros.h:150
#define MulF(VAR, FLOAT_VALUE)
Definition macros.h:385
#define DMG_STATUS_KEY(typeFlag, duration, chance)
Definition macros.h:228
#define EVT_IGNORE_ARG
Definition macros.h:46
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define IfNotFlag(LVAR, RVAR)
Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR,...
Definition macros.h:292
#define LVarD
Definition macros.h:161
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LFlag2
Definition macros.h:169
#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 LFlag3
Definition macros.h:170
#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
#define ACTOR_BY_POS(_name, _pos, _priority, args...)
Definition battle.h:230
@ BTL_POS_GROUND_B
Definition battle.h:62
@ BTL_POS_GROUND_D
Definition battle.h:64
@ BTL_POS_GROUND_A
Definition battle.h:61
@ BTL_POS_GROUND_C
Definition battle.h:63
FormationRow Formation[]
Definition battle.h:167