12 while (partIt != NULL) {
123 if (handleEventScript != NULL) {
143 if (target == NULL) {
148 ASSERT(targetPart != NULL);
151 switch (actorClass) {
179 switch (actorClass) {
242 s32 statusInflicted = FALSE;
243 s32 statusInflicted2 = FALSE;
247 s32 isElectric = FALSE;
248 s32 madeElectricContact = FALSE;
263 if (target == NULL) {
268 ASSERT(targetPart != NULL);
273 switch (actorClass) {
342 madeElectricContact = TRUE;
377 switch (actorClass) {
422 if (target->
curHP <= 5) {
431 switch (actorClass) {
488 if (target->
curHP < 1) {
502 target->
curHP -= damage;
505 if (target->
curHP < 1) {
604 statusInflicted = one;
605 statusInflicted2 = one;
608 statusInflicted = one;
609 statusInflicted2 = one;
612 statusInflicted = one;
613 statusInflicted2 = one;
616 statusInflicted = one;
617 statusInflicted2 = one;
620 statusInflicted = one;
621 statusInflicted2 = one;
624 statusInflicted = one;
625 statusInflicted2 = one;
628 statusInflicted = one;
629 statusInflicted2 = one;
632 statusInflicted = one;
633 statusInflicted2 = one;
636 statusInflicted = one;
637 statusInflicted2 = one;
642 statusInflicted = one;
643 statusInflicted2 = one;
646 statusInflicted = one;
647 statusInflicted2 = one;
651 statusInflicted = one;
652 statusInflicted2 = one;
655 if (statusInflicted) {
669 switch (actorClass) {
690 switch (actorClass) {
694 if (!statusInflicted2 && !statusInflicted) {
709 if (!statusInflicted2 && !statusInflicted) {
734 }
else if (!isElectric) {
749 script->varTable[0] = state->
goalPos.
x;
750 script->varTable[1] = state->
goalPos.
y;
751 script->varTable[2] = state->
goalPos.
z;
756 script->varTable[0] = state->
goalPos.
x;
757 script->varTable[1] = state->
goalPos.
y;
758 script->varTable[2] = state->
goalPos.
z;
763 script->varTable[0] = state->
goalPos.
x;
764 script->varTable[1] = state->
goalPos.
y;
765 script->varTable[2] = state->
goalPos.
z;
770 script->varTable[0] = state->
goalPos.
x;
771 script->varTable[1] = state->
goalPos.
y;
772 script->varTable[2] = state->
goalPos.
z;
777 script->varTable[0] = state->
goalPos.
x;
778 script->varTable[1] = state->
goalPos.
y;
779 script->varTable[2] = state->
goalPos.
z;
784 script->varTable[0] = state->
goalPos.
x;
785 script->varTable[1] = state->
goalPos.
y;
786 script->varTable[2] = state->
goalPos.
z;
787 script->varTablePtr[3] = target;
792 script->varTable[0] = state->
goalPos.
x;
793 script->varTable[1] = state->
goalPos.
y;
794 script->varTable[2] = state->
goalPos.
z;
795 script->varTablePtr[3] = target;
824 s32 dispatchEvent = originalEvent;
825 s32 currentAttackDamage;
832 hpChange = (s16) damageAmount;
839 actor->
curHP -= hpChange;
841 if (actor->
curHP <= 0) {
897API_CALLABLE(BindTakeTurn) {
898 Bytecode* args = script->ptrReadPos;
903 actorID = script->owner1.actorID;
911API_CALLABLE(PauseTakeTurn) {
912 Bytecode* args = script->ptrReadPos;
916 actorID = script->owner1.actorID;
924API_CALLABLE(ResumeTakeTurn) {
925 Bytecode* args = script->ptrReadPos;
929 actorID = script->owner1.actorID;
937API_CALLABLE(BindIdle) {
938 Bytecode* args = script->ptrReadPos;
942 Evt* newScriptContext;
945 actorID = script->
owner1.actorID;
960 newScriptContext->
owner1.actorID = actorID;
964API_CALLABLE(EnableIdleScript) {
965 Bytecode* args = script->ptrReadPos;
971 actorID = script->owner1.
actorID;
995API_CALLABLE(BindHandleEvent) {
996 Bytecode* args = script->ptrReadPos;
1001 actorID = script->owner1.actorID;
1009API_CALLABLE(BindHandlePhase) {
1010 Bytecode* args = script->ptrReadPos;
1015 actorID = script->owner1.actorID;
1023API_CALLABLE(JumpToGoal) {
1024 Bytecode* args = script->ptrReadPos;
1028 f32 posX, posY, posZ;
1029 f32 goalX, goalY, goalZ;
1032 if (isInitialCall) {
1033 script->functionTemp[0] = 0;
1036 if (script->functionTemp[0] == 0) {
1039 actorID = script->owner1.enemyID;
1041 script->functionTempPtr[1] = actor =
get_actor(actorID);
1042 actorState = &actor->
state;
1045 script->functionTemp[3] = 0;
1047 script->functionTemp[3] |= 1;
1050 script->functionTemp[3] |= 2;
1063 actorState->
angle =
atan2(posX, posZ, goalX, goalZ);
1064 actorState->
dist =
dist2D(posX, posZ, goalX, goalZ);
1067 posX = (goalX - posX);
1068 posY = (goalY - posY);
1069 posZ = (goalZ - posZ);
1086 if (script->functionTemp[2] != 0) {
1089 if (!(script->functionTemp[3] & 2) && (actor->
actorTypeData1[4] != 0)) {
1092 script->functionTemp[0] = 1;
1095 actor = script->functionTempPtr[1];
1096 actorState = &actor->
state;
1101 if ((script->functionTemp[2] != 0) && (actorState->
vel < 0.0f)) {
1104 if (actorState->
vel < 0.0f) {
1120 if (script->functionTemp[3] & 1) {
1126 if (script->functionTemp[2] != 0) {
1132API_CALLABLE(IdleJumpToGoal) {
1133 Bytecode* args = script->ptrReadPos;
1136 f32 posX, posY, posZ;
1137 f32 goalX, goalY, goalZ;
1140 if (isInitialCall) {
1141 script->functionTemp[0] = FALSE;
1144 if (!script->functionTemp[0]) {
1148 actorID = script->owner1.actorID;
1151 script->functionTempPtr[1] = actor =
get_actor(actorID);
1152 movement = &actor->
fly;
1168 movement->
angle =
atan2(posX, posZ, goalX, goalZ);
1169 movement->
dist =
dist2D(posX, posZ, goalX, goalZ);
1172 posX = (goalX - posX);
1173 posY = (goalY - posY);
1174 posZ = (goalZ - posZ);
1190 script->functionTemp[0] = TRUE;
1193 actor = script->functionTempPtr[1];
1194 movement = &actor->
fly;
1208 if (script->functionTemp[3] != 0) {
1220API_CALLABLE(JumpToGoalSimple2) {
1221 Bytecode* args = script->ptrReadPos;
1223 f32 posX, posY, posZ;
1224 f32 goalX, goalY, goalZ;
1228 if (isInitialCall) {
1229 script->functionTemp[0] = FALSE;
1232 if (!script->functionTemp[0]) {
1236 actorID = script->owner1.actorID;
1239 script->functionTempPtr[1] = actor =
get_actor(actorID);
1240 state = &actor->
state;
1253 state->
angle =
atan2(posX, posZ, goalX, goalZ);
1254 state->
dist =
dist2D(posX, posZ, goalX, goalZ);
1257 posX = (posX - goalX);
1258 posY = (posY - goalY);
1259 posZ = (posZ - goalZ);
1278 script->functionTemp[0] = TRUE;
1281 actor = script->functionTempPtr[1];
1282 state = &actor->
state;
1306API_CALLABLE(JumpWithBounce) {
1307 Bytecode* args = script->ptrReadPos;
1311 f32 posX, posY, posZ;
1312 f32 goalX, goalY, goalZ;
1315 if (isInitialCall) {
1316 script->functionTemp[0] = FALSE;
1319 if (!script->functionTemp[0]) {
1322 actorID = script->owner1.enemyID;
1324 script->functionTempPtr[1] = actor =
get_actor(actorID);
1325 actorState = &actor->
state;
1340 actorState->
angle =
atan2(posX, posZ, goalX, goalZ);
1341 actorState->
dist =
dist2D(posX, posZ, goalX, goalZ);
1344 posX = (goalX - posX);
1345 posY = (goalY - posY);
1346 posZ = (goalZ - posZ);
1366 script->functionTemp[0] = TRUE;
1369 actor = script->functionTempPtr[1];
1370 actorState = &actor->
state;
1372 switch (script->functionTemp[0]) {
1379 script->functionTemp[0] = 2;
1386 if (actorState->
vel > 0.0f) {
1389 script->functionTemp[0] = 3;
1408API_CALLABLE(LandJump) {
1409 Bytecode* args = script->ptrReadPos;
1412 if (isInitialCall) {
1413 script->functionTemp[0] = FALSE;
1416 if (!script->functionTemp[0]) {
1420 actorID = script->owner1.actorID;
1424 script->functionTempPtr[1] = actor;
1428 script->functionTemp[0] = TRUE;
1431 actor = script->functionTempPtr[1];
1449API_CALLABLE(FallToGoal) {
1450 Bytecode* args = script->ptrReadPos;
1453 f32 posX, posY, posZ;
1454 f32 goalX, goalY, goalZ;
1456 if (isInitialCall) {
1457 script->functionTemp[0] = 0;
1460 if (script->functionTemp[0] == 0) {
1464 actorID = script->owner1.enemyID;
1467 state = &actor->
state;
1468 script->functionTempPtr[1] = actor;
1487 posX = (goalX - posX);
1488 posY = (goalY - posY);
1489 posZ = (goalZ - posZ);
1503 script->functionTemp[0] = 1;
1506 actor = script->functionTempPtr[1];
1526API_CALLABLE(RunToGoal) {
1527 Bytecode* args = script->ptrReadPos;
1531 f32 posX, posY, posZ;
1532 f32 goalX, goalY, goalZ;
1534 if (isInitialCall) {
1535 script->functionTemp[0] = FALSE;
1538 if (!script->functionTemp[0]) {
1541 actorID = script->owner1.enemyID;
1543 script->functionTempPtr[1] = actor =
get_actor(actorID);
1544 actorState = &actor->
state;
1564 actorState->
angle =
atan2(posX, posZ, goalX, goalZ);
1565 actorState->
dist =
dist2D(posX, posZ, goalX, goalZ);
1580 actorState->
dist = ~actor->actorTypeData1b[0];
1585 script->functionTemp[0] = TRUE;
1588 actor = script->functionTempPtr[1];
1589 actorState = &actor->
state;
1592 if (script->functionTemp[2] == 0) {
1593 if (actorState->
speed < 4.0f) {
1607 actorState->
dist = 0.0f;
1619 actorState->
dist += 1.0f;
1622 actorState->
dist = 0.0f;
1651API_CALLABLE(IdleRunToGoal) {
1652 Bytecode* args = script->ptrReadPos;
1655 f32 posX, posY, posZ;
1656 f32 goalX, goalY, goalZ;
1659 if (isInitialCall) {
1660 script->functionTemp[0] = FALSE;
1663 if (!script->functionTemp[0]) {
1666 actorID = script->owner1.actorID;
1668 script->functionTempPtr[1] = actor =
get_actor(actorID);
1669 movement = &actor->
fly;
1689 movement->
angle =
atan2(posX, posZ, goalX, goalZ);
1690 movement->
dist =
dist2D(posX, posZ, goalX, goalZ);
1706 movement->
dist = ~actor->actorTypeData1b[0];
1708 script->functionTemp[0] = TRUE;
1711 actor = script->functionTempPtr[1];
1712 movement = &actor->
fly;
1715 if (movement->
speed < 4.0f) {
1736API_CALLABLE(JumpPartTo) {
1737 Bytecode* args = script->ptrReadPos;
1741 s32 actorID, partID;
1742 f32 posX, posY, posZ;
1743 f32 goalX, goalY, goalZ;
1746 if (isInitialCall) {
1747 script->functionTemp[0] = 0;
1750 if (script->functionTemp[0] == 0) {
1753 actorID = script->owner1.actorID;
1759 script->functionTempPtr[1] = actor;
1760 script->functionTempPtr[2] = part;
1784 movement->
angle =
atan2(posX, posZ, goalX, goalZ);
1785 movement->
dist =
dist2D(posX, posZ, goalX, goalZ);
1788 posX = (goalX - posX);
1789 posY = (goalY - posY);
1790 posZ = (goalZ - posZ);
1804 script->functionTemp[0] = 1;
1807 part = script->functionTempPtr[2];
1818 if (script->functionTemp[3] != 0) {
1830API_CALLABLE(FallPartTo) {
1831 Bytecode* args = script->ptrReadPos;
1835 s32 actorID, partID;
1836 f32 posX, posY, posZ;
1837 f32 goalX, goalY, goalZ;
1839 if (isInitialCall) {
1840 script->functionTemp[0] = 0;
1843 if (script->functionTemp[0] == 0) {
1846 actorID = script->owner1.actorID;
1852 script->functionTempPtr[1] = actor;
1853 script->functionTempPtr[2] = part;
1876 movement->
angle =
atan2(posX, posZ, goalX, goalZ);
1877 movement->
dist =
dist2D(posX, posZ, goalX, goalZ);
1880 posX = (goalX - posX);
1881 posY = (goalY - posY);
1882 posZ = (goalZ - posZ);
1895 script->functionTemp[0] = 1;
1898 part = script->functionTempPtr[2];
1919API_CALLABLE(LandJumpPart) {
1920 Bytecode* args = script->ptrReadPos;
1925 if (isInitialCall) {
1926 script->functionTemp[0] = 0;
1929 if (script->functionTemp[0] == 0) {
1934 actorID = script->owner1.actorID;
1939 script->functionTempPtr[1] = actor;
1940 script->functionTempPtr[2] = part;
1945 script->functionTemp[0] = 1;
1948 part = script->functionTempPtr[2];
1966API_CALLABLE(RunPartTo) {
1967 Bytecode* args = script->ptrReadPos;
1971 s32 actorID, partID;
1972 f32 posX, posY, posZ;
1973 f32 goalX, goalY, goalZ;
1976 if (isInitialCall) {
1977 script->functionTemp[0] = 0;
1980 if (script->functionTemp[0] == 0) {
1983 actorID = script->owner1.actorID;
1989 script->functionTempPtr[1] = actor;
1990 script->functionTempPtr[2] = part;
2013 movement->
angle =
atan2(posX, posZ, goalX, goalZ);
2014 movement->
dist =
dist2D(posX, posZ, goalX, goalZ);
2024 movement->
dist = ~part->actorTypeData2b[0];
2029 script->functionTemp[0] = 1;
2032 part = script->functionTempPtr[2];
2034 actor = script->functionTempPtr[1];
2063 movement->
dist += 1.0f;
2108 return start + (end - start) * elapsed / duration;
2110 return start +
SQ(elapsed) * (end - start) /
SQ(duration);
2112 return start +
CUBE(elapsed) * (end - start) /
CUBE(duration);
2114 return start +
QUART(elapsed) * (end - start) /
QUART(duration);
2117 return end - (len1 *
cos_rad(((f32)elapsed / duration) *
PI_D * 4.0) * (duration - elapsed) *
2118 (duration - elapsed)) /
SQ((f32)duration);
2121 return end - (len2 *
cos_rad((((f32)
SQ(elapsed) / duration) *
PI_D * 4.0) / 15.0) * (duration - elapsed) *
2122 (duration - elapsed)) /
SQ((f32)duration);
2124 timeLeft = duration - elapsed;
2125 return start + (end - start) - ((
SQ(timeLeft) * (end - start))) /
SQ(duration);
2128 timeLeft = duration - elapsed;
2129 return start + len3 - ((
CUBE(timeLeft) * len3)) /
CUBE(duration);
2132 timeLeft = duration - elapsed;
2133 return start + len4 - ((
QUART(timeLeft) * len4)) /
QUART(duration);
2135 absMag =
cos_rad((((f32)
SQ(elapsed) / duration) *
PI_D * 4.0) / 40.0) * (duration - elapsed) *
2136 (duration - elapsed) /
SQ((f32)duration);
2137 if (absMag < 0.0f) {
2140 return end - (end - start) * absMag;
2144 return start1 + (len5 * (1.0 -
cos_rad(((f32)elapsed *
PI_D) / (f32)duration)) / 2);
2147 return start + (len6 *
sin_rad((((f32) elapsed) * (
PI_D / 2)) / ((f32) duration)));
2151 return start2 + (len7 * (1.0 -
cos_rad(((f32)elapsed * (
PI_D / 2)) / (f32)duration)));
2157API_CALLABLE(FlyToGoal) {
2158 Bytecode* args = script->ptrReadPos;
2162 f32 posX, posY, posZ;
2163 f32 goalX, goalY, goalZ;
2164 f32 deltaX, deltaY, deltaZ;
2168 if (isInitialCall) {
2171 actorID = script->owner1.enemyID;
2173 script->functionTempPtr[1] = actor =
get_actor(actorID);
2174 actorState = &actor->
state;
2179 actorState->functionTemp[0] = FALSE;
2181 if (script->functionTemp[3] >= 100) {
2182 script->functionTemp[3] -= 100;
2183 actorState->functionTemp[0] = TRUE;
2194 deltaX = posX - goalX;
2195 deltaY = posY - goalY;
2196 deltaZ = posZ - goalZ;
2217 actorState->
angle = 0.0f;
2221 actorState->
vel = ~actor->actorTypeData1b[1];
2228 actor = script->functionTempPtr[1];
2229 actorState = &actor->
state;
2234 if ((actorState->functionTemp[0]) && (actorState->
curPos.
y < 0.0f)) {
2254 actorState->
vel += actorState->
speed;
2257 actorState->
vel = 0.0f;
2269 actorState->
vel += 1.0f;
2272 actorState->
vel = 0.0f;
2293 if (actorState->
dist == 0.0f) {
2294 actorState->
dist = 1.0f;
2312API_CALLABLE(IdleFlyToGoal) {
2313 Bytecode* args = script->ptrReadPos;
2317 f32 posX, posY, posZ;
2318 f32 goalX, goalY, goalZ;
2319 f32 deltaX, deltaY, deltaZ;
2323 if (isInitialCall) {
2326 actorID = script->owner1.enemyID;
2328 script->functionTempPtr[1] = actor =
get_actor(actorID);
2329 movement = &actor->
fly;
2343 deltaX = posX - goalX;
2344 deltaY = posY - goalY;
2345 deltaZ = posZ - goalZ;
2366 movement->
angle = 0.0f;
2367 movement->
vel = 0.0f;
2370 actor = script->functionTempPtr[1];
2371 movement = &actor->
fly;
2392 if (movement->
dist == 0.0f) {
2393 movement->
dist = 1.0f;
2413API_CALLABLE(FlyPartTo) {
2414 Bytecode* args = script->ptrReadPos;
2421 f32 posX, posY, posZ;
2422 f32 goalX, goalY, goalZ;
2423 f32 deltaX, deltaY, deltaZ;
2427 if (isInitialCall) {
2430 actorID = script->owner1.actorID;
2436 script->functionTempPtr[1] = actor;
2437 script->functionTempPtr[2] = part;
2449 deltaX = posX - goalX;
2451 partMovement->
unk_18.
x = posX;
2455 deltaY = posY - goalY;
2457 partMovement->
unk_18.
y = posY;
2461 deltaZ = posZ - goalZ;
2463 partMovement->
unk_18.
z = posZ;
2480 partMovement->
unk_3C = 0;
2481 partMovement->
angle = 0.0f;
2486 partMovement->
unk_2C = ~actor->actorTypeData1b[1];
2490 part = script->functionTempPtr[2];
2491 actor = script->functionTempPtr[1];
2513 partMovement->
unk_2C = 0;
2525 partMovement->
unk_2C += 1.0f;
2528 partMovement->
unk_2C = 0;
2549 if (partMovement->
dist == 0.0f) {
2550 partMovement->
dist = 1.0f;
2554 if (partMovement->
unk_3A == 0) {
2557 if (partMovement->
unk_3A < 0) {
2558 offsetY = -offsetY * (-partMovement->
unk_3A);
2560 if (partMovement->
unk_3A > 0) {
2561 offsetY = offsetY * partMovement->
unk_3A;
2570API_CALLABLE(GetLastEvent) {
2571 Bytecode* args = script->ptrReadPos;
2576 actorID = script->owner1.actorID;
2584API_CALLABLE(SetTargetActor) {
2585 Bytecode* args = script->ptrReadPos;
2591 actorID = script->owner1.
actorID;
2601API_CALLABLE(SetEnemyHP) {
2602 Bytecode* args = script->ptrReadPos;
2608 actorID = script->owner1.
actorID;
2614 actor->
curHP = newHP;
2615 if (newHP > actor->
maxHP) {
2624API_CALLABLE(GetActorHP) {
2626 Bytecode* args = script->ptrReadPos;
2633 actorID = script->owner1.
actorID;
2641 outVal = playerData->
curHP;
2647 outVal = actor->
curHP;
2655API_CALLABLE(GetEnemyMaxHP) {
2656 Bytecode* args = script->ptrReadPos;
2661 actorID = script->owner1.actorID;
2669API_CALLABLE(RemoveActor) {
2672 Bytecode* args = script->ptrReadPos;
2680 actorID = script->owner1.
actorID;
2687 for (i = 0; i < numEnemies; i++) {
2688 if (actor == battleStatus->
enemyActors[enemyIDs[i] & 0xFF]) {
2707 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
2710API_CALLABLE(DropStarPoints) {
2713 Bytecode* args = script->ptrReadPos;
2723 actorID = script->owner1.enemyID;
2732 playerLevel = playerData->
level;
2733 if (playerLevel == 0.0f) {
2738 if (!(enemyLevel < playerLevel)) {
2740 ntd = (ntd + 50.0f) / 100.0f;
2744 if (playerData->
level < 27) {
2754 for (i = 0; i < numToDrop; i++) {
2767API_CALLABLE(SetDefenseTable) {
2768 Bytecode* args = script->ptrReadPos;
2774 actorID = script->owner1.actorID;
2783API_CALLABLE(SetStatusTable) {
2784 Bytecode* args = script->ptrReadPos;
2789 actorID = script->owner1.actorID;
2797API_CALLABLE(SetIdleAnimations) {
2798 Bytecode* args = script->ptrReadPos;
2804 actorID = script->owner1.actorID;
2813API_CALLABLE(func_8027CC10) {
2814 Bytecode* args = script->ptrReadPos;
2819 actorID = script->owner1.actorID;
2832API_CALLABLE(EnemyDamageTarget) {
2833 Bytecode* args = script->ptrReadPos;
2839 s32 battleStatusFlags1Temp;
2840 s32 battleFlagsModifier;
2843 actorID = script->owner1.enemyID;
2852 battleFlagsModifier = *args++;
2855 if (dx_debug_is_cheat_enabled(DEBUG_CHEAT_GOD_MODE)) {
2901 if (hitResult < 0) {
2913API_CALLABLE(EnemyFollowupAfflictTarget) {
2916 Bytecode* args = script->ptrReadPos;
2923 actorID = script->owner1.actorID;
2940 if (hitResults < 0) {
2951API_CALLABLE(EnemyTestTarget) {
2952 Bytecode* args = script->ptrReadPos;
2959 s32 battleStatusFlags1Temp;
2960 s32 battleFlagsModifier;
2963 actorID = script->owner1.enemyID;
2972 battleFlagsModifier = *args++;
3007 if ((attackStatus & 0xFF) == 0xFF) {
3014 if (hitResult < 0) {
3023API_CALLABLE(DispatchDamageEvent) {
3024 Bytecode* args = script->ptrReadPos;
3031 actorID = script->owner1.
actorID;
3049API_CALLABLE(DispatchEvent) {
3050 Bytecode* args = script->ptrReadPos;
3054 actorID = script->owner1.actorID;
3061API_CALLABLE(ShowHealthBar) {
3065 actorID = script->owner1.actorID;
3072API_CALLABLE(HideHealthBar) {
3076 actorID = script->owner1.actorID;
3083API_CALLABLE(SetTargetOffset) {
3084 Bytecode* args = script->ptrReadPos;
3092 actorID = script->owner1.actorID;
3107API_CALLABLE(func_8027D434) {
3108 Bytecode* args = script->ptrReadPos;
3114 actorID = script->owner1.actorID;
3123API_CALLABLE(SetProjectileTargetOffset) {
3124 Bytecode* args = script->ptrReadPos;
3132 actorID = script->owner1.actorID;
3147API_CALLABLE(EnableActorBlur) {
3148 Bytecode* args = script->ptrReadPos;
3154 actorID = script->owner1.
actorID;
3169API_CALLABLE(ForceDisableActorBlur) {
3170 Bytecode* args = script->ptrReadPos;
3175 actorID = script->owner1.
actorID;
3183API_CALLABLE(AfflictActor) {
3184 Bytecode* args = script->ptrReadPos;
3189 s32 statusDurationKey;
3195 actorID = script->owner1.actorID;
3199 switch (statusTypeKey) {
3222API_CALLABLE(GetInstigatorValue) {
3223 Bytecode* args = script->ptrReadPos;
3225 s32 outVar = *args++;
3228 actorID = script->owner1.actorID;
3235API_CALLABLE(GetEncounterTrigger) {
3240API_CALLABLE(YieldTurn) {
3245API_CALLABLE(SetActorSize) {
3246 Bytecode* args = script->ptrReadPos;
3253 actorID = script->owner1.
actorID;
3269API_CALLABLE(GetActorSize) {
3270 Bytecode* args = script->ptrReadPos;
3277 actorID = script->owner1.
actorID;
3286API_CALLABLE(SetPartSize) {
3287 Bytecode* args = script->ptrReadPos;
3295 actorID = script->owner1.actorID;
3301 part->
size.
y = sizeY;
3305 part->
size.
x = sizeX;
3313API_CALLABLE(GetOriginalActorType) {
3314 Bytecode* args = script->ptrReadPos;
3316 s32 outVar = *args++;
3319 actorID = script->owner1.actorID;
3326API_CALLABLE(GetCurrentActorType) {
3327 Bytecode* args = script->ptrReadPos;
3329 s32 outVar = *args++;
3332 actorID = script->owner1.actorID;
3339API_CALLABLE(GetLastDamage) {
3340 Bytecode* args = script->ptrReadPos;
3345 actorID = script->owner1.actorID;
3353API_CALLABLE(EnableActorGlow) {
3354 Bytecode* args = script->ptrReadPos;
3360 actorID = script->owner1.
actorID;
3370 while (it != NULL) {
3382API_CALLABLE(WasStatusInflicted) {
3383 Bytecode* args = script->ptrReadPos;
3399API_CALLABLE(CopyStatusEffects) {
3400 Bytecode* args = script->ptrReadPos;
3408 actorIDFrom = script->owner1.actorID;
3414 actorIDTo = script->owner1.actorID;
3430API_CALLABLE(ClearStatusEffects) {
3431 Bytecode* args = script->ptrReadPos;
3437 actorID = script->owner1.
actorID;
3442 if (actor->
debuff != 0) {
s32 dispatch_damage_event_actor_1(Actor *actor, s32 damageAmount, s32 event)
void dispatch_event_actor(Actor *actor, s32 event)
HitResult calc_enemy_test_target(Actor *actor)
void dispatch_event_general(Actor *actor, s32 event)
f32 update_lerp_battle(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration)
s32 dispatch_damage_event_actor(Actor *actor, s32 damageAmount, s32 originalEvent, s32 stopMotion)
void play_hit_sound(Actor *actor, f32 x, f32 y, f32 z, u32 hitSound)
s32 StarPointMultiplier[]
Star Point multiplier, indexed by actor count.
s32 dispatch_damage_event_actor_0(Actor *actor, s32 damageAmount, s32 event)
s32 has_enchanted_part(Actor *actor)
HitResult calc_enemy_damage_target(Actor *attacker)
void snd_stop_sound(s32 soundID)
s32 check_block_input(s32 buttonMask)
struct EffectInstance * disableEffect
struct Evt * takeTurnScript
struct ActorPartMovement * movement
EvtScript * handleEventSource
struct ActorBlueprint * actorBlueprint
Vec2b projectileTargetOffset
struct Evt * handleEventScript
struct ActorPart * partsTable
struct SelectableTarget targetData[24]
EvtScript * handlePhaseSource
union Evt::@8 owner1
Initially -1.
EvtScript * takeTurnSource
struct ActorPart * nextPart
#define sfx_play_sound_at_position
struct DisableXFXData * disableX
#define ASSERT(condition)
@ ACTION_RATING_NICE
sets nice hits = 1
@ BS_FLAGS1_TUTORIAL_BATTLE
@ BS_FLAGS1_STAR_POINTS_DROPPED
@ BS_FLAGS1_PLAYER_DEFENDING
@ BS_FLAGS1_TRIGGER_EVENTS
@ BS_FLAGS1_INCLUDE_POWER_UPS
@ ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED
Actor glows and listens for Star Beam and Peach Beam events.
@ ACTOR_EVENT_FLAG_ELECTRIFIED
Player takes shock damage upon contact.
@ ACTOR_EVENT_FLAG_BURIED
Actor can only by hit by quake-element attacks.
@ ACTOR_EVENT_FLAG_FLIPABLE
Actor can be flipped; triggered by jump and quake attacks.
@ ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
Blast and fire attacks trigger an explosion.
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
@ ACTOR_EVENT_FLAG_ENCHANTED
Actor glows and listens for the Star Beam event.
@ ITEM_SPAWN_MODE_TOSS_FADE3
@ ITEM_SPAWN_MODE_TOSS_FADE1
@ BS_FLAGS2_IS_FIRST_STRIKE
@ STATUS_TURN_MOD_PARALYZE
@ SUPPRESS_EVENT_SHOCK_CONTACT
@ EASING_COS_SLOW_OVERSHOOT
@ EASING_COS_FAST_OVERSHOOT
@ ABILITY_HEALTHY_HEALTHY
@ SOUND_HIT_PLAYER_NORMAL
@ ACTOR_FLAG_FLYING
Quake Hammer can't hit.
@ ACTOR_FLAG_NO_DMG_POPUP
Hide damage popup.
@ ACTOR_FLAG_HEALTH_BAR_HIDDEN
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
@ ACTOR_FLAG_NO_DMG_APPLY
Damage is not applied to actor HP.
@ EVENT_SPIN_SMASH_LAUNCH_HIT
@ EVENT_SPIN_SMASH_LAUNCH_DEATH
@ ACTOR_PART_FLAG_DAMAGE_IMMUNE
electrified Plays extra hurt SFX?
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
@ DAMAGE_TYPE_UNBLOCKABLE
@ DAMAGE_TYPE_IGNORE_DEFENSE
@ DAMAGE_TYPE_TRIGGER_LUCKY
@ DAMAGE_TYPE_MULTIPLE_POPUPS
@ EVT_FLAG_RUN_IMMEDIATELY
don't wait for next update_scripts call
void show_primary_damage_popup(f32 x, f32 y, f32 z, s32 attack, s32 a)
void enable_actor_blur(Actor *)
s32 does_script_exist_by_ref(Evt *script)
s32 evt_get_variable(Evt *script, Bytecode var)
s32 is_ability_active(s32 arg0)
s32 player_team_is_ability_active(Actor *actor, s32 ability)
void show_immune_bonk(f32 x, f32 y, f32 z, s32, s32, s32)
void remove_status_debuff(s32)
void disable_actor_blur(Actor *)
void add_xz_vec3f_copy1(Vec3f *vector, f32 speed, f32 angleDeg)
void hide_actor_health_bar(Actor *)
void show_actor_health_bar(Actor *)
void remove_status_static(s32)
void clear_part_pal_adjustment(ActorPart *)
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
Evt * get_script_by_index(s32 index)
s32 suspend_all_script(s32 id)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void remove_status_transparent(s32)
void dispatch_event_player(s32)
void set_actor_flash_mode(Actor *actor, s32 arg1)
void show_damage_fx(Actor *actor, f32 x, f32 y, f32 z, s32 damage)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
void add_xz_vec3f(Vec3f *vector, f32 speed, f32 angleDeg)
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
s32 inflict_status(Actor *, s32, s32)
ActorPart * get_actor_part(Actor *actor, s32 partID)
s32 func_80263230(Actor *, Actor *)
void set_actor_glow_pal(Actor *actor, s32 arg1)
s32 get_defense(Actor *actor, s32 *defenseTable, s32 elementFlags)
void add_xz_vec3f_copy2(Vec3f *vector, f32 speed, f32 angleDeg)
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Actor * get_actor(s32 actorID)
void kill_script_by_ID(s32 id)
void func_80266970(Actor *)
void reset_actor_blur(Actor *)
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg)
void force_disable_actor_blur(Actor *)
s32 inflict_status_set_duration(Actor *actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration)
s32 resume_all_script(s32 id)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void btl_delete_actor(Actor *actor)
void show_next_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32)
void apply_shock_effect(Actor *)
s32 make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 pickupVar)
void show_action_rating(s32, Actor *, f32, f32, f32)
s32 try_inflict_status(Actor *, s32, s32)
s32 inflict_partner_ko(Actor *target, s32 statusTypeKey, s32 duration)
Evt * restart_script(Evt *script)
void dispatch_event_partner(s32)
EvtScript EVS_PlayStopHitFX
EvtScript EVS_PlayFreezeHitFX
EvtScript EVS_PlayShrinkHitFX
EvtScript EVS_PlayParalyzeHitFX
EvtScript EVS_PlayPoisonHitFX
EvtScript EVS_PlaySleepHitFX
EvtScript EVS_PlayDizzyHitFX
EncounterStatus gCurrentEncounter
void set_npc_imgfx_all(s32 spriteIdx, ImgFXType imgfxType, s32 imgfxArg1, s32 imgfxArg2, s32 imgfxArg3, s32 imgfxArg4, s32 imgfxArg5)
s8 incrementStarPointDelay
s32 curAttackEventSuppression
struct Actor * enemyActors[24]
BattleStatus gBattleStatus