23 }
else if (y < 85.0f) {
25 }
else if (y < 100.0f) {
33 }
else if (x < 65.0f) {
35 }
else if (x < 105.0f) {
41 return col | (row << 2);
159 u32 idIdx = (u8)actorID;
161 switch (actorClass) {
175API_CALLABLE(LoadBattleSection) {
183API_CALLABLE(GetBattlePhase) {
188API_CALLABLE(GetLastElement) {
193API_CALLABLE(GetDamageSource) {
198API_CALLABLE(SetDamageSource) {
199 s32 damageSource = *script->ptrReadPos;
205API_CALLABLE(SetGoalToHome) {
210 actorID = script->owner1.
actorID;
221API_CALLABLE(SetIdleGoalToHome) {
226 actorID = script->owner1.
actorID;
237API_CALLABLE(SetGoalToIndex) {
238 s32* args = script->ptrReadPos;
244 actorID = script->owner1.
actorID;
255API_CALLABLE(GetIndexFromPos) {
256 Bytecode* args = script->ptrReadPos;
258 s32 outVar = *args++;
263 actorID = script->owner1.
actorID;
273API_CALLABLE(GetIndexFromHome) {
274 Bytecode* args = script->ptrReadPos;
276 s32 outVar = *args++;
281 actorID = script->owner1.
actorID;
291API_CALLABLE(CountTargets) {
292 Bytecode* args = script->ptrReadPos;
294 s32 targetSelectionFlags = *args++;
295 s32 outVar = *args++;
301 actorID = script->owner1.
actorID;
306 numTargets =
count_targets(actor, homeIdx, targetSelectionFlags);
312API_CALLABLE(ForceHomePos) {
313 Bytecode* args = script->ptrReadPos;
319 actorID = script->owner1.
actorID;
334API_CALLABLE(SetHomePos) {
335 Bytecode* args = script->ptrReadPos;
341 actorID = script->owner1.
actorID;
356API_CALLABLE(SetGoalToTarget) {
357 Bytecode* args = script->ptrReadPos;
362 actorID = script->owner1.
actorID;
371API_CALLABLE(SetPartGoalToTarget) {
372 Bytecode* args = script->ptrReadPos;
378 actorID = script->owner1.
actorID;
387API_CALLABLE(SetGoalToFirstTarget) {
388 Bytecode* args = script->ptrReadPos;
394 actorID = script->owner1.
actorID;
404API_CALLABLE(SetGoalPos) {
405 Bytecode* args = script->ptrReadPos;
412 actorID = script->owner1.actorID;
415 walk = &actor->
state;
444API_CALLABLE(SetIdleGoal) {
445 Bytecode* args = script->ptrReadPos;
452 actorID = script->owner1.actorID;
483API_CALLABLE(AddGoalPos) {
484 Bytecode* args = script->ptrReadPos;
490 actorID = script->owner1.
actorID;
505API_CALLABLE(GetGoalPos) {
506 Bytecode* args = script->ptrReadPos;
509 s32 outX, outY, outZ;
513 actorID = script->owner1.
actorID;
534API_CALLABLE(GetIdleGoal) {
535 Bytecode* args = script->ptrReadPos;
538 s32 outX, outY, outZ;
542 actorID = script->owner1.
actorID;
562API_CALLABLE(GetPartTarget) {
563 Bytecode* args = script->ptrReadPos;
568 s32 outX, outY, outZ;
572 actorID = script->owner1.actorID;
593API_CALLABLE(GetActorPos) {
594 Bytecode* args = script->ptrReadPos;
597 s32 outX, outY, outZ;
601 actorID = script->owner1.
actorID;
621API_CALLABLE(GetPartOffset) {
622 Bytecode* args = script->ptrReadPos;
626 s32 outX, outY, outZ;
630 actorID = script->owner1.actorID;
657API_CALLABLE(GetPartPos) {
658 Bytecode* args = script->ptrReadPos;
662 s32 outX, outY, outZ;
666 actorID = script->owner1.actorID;
687API_CALLABLE(GetHomePos) {
688 Bytecode* args = script->ptrReadPos;
691 s32 outX, outY, outZ;
695 actorID = script->owner1.
actorID;
715API_CALLABLE(SetActorPos) {
716 Bytecode* args = script->ptrReadPos;
722 actorID = script->owner1.
actorID;
737API_CALLABLE(SetPartPos) {
738 Bytecode* args = script->ptrReadPos;
746 actorID = script->owner1.actorID;
781API_CALLABLE(SetEnemyTargetOffset) {
782 Bytecode* args = script->ptrReadPos;
790 actorID = script->owner1.actorID;
813API_CALLABLE(SetAnimation) {
814 Bytecode* args = script->ptrReadPos;
821 actorID = script->owner1.
actorID;
832API_CALLABLE(GetAnimation) {
833 Bytecode* args = script->ptrReadPos;
840 actorID = script->owner1.actorID;
847 if (actorPart != NULL) {
853API_CALLABLE(SetAnimationRate) {
854 Bytecode* args = script->ptrReadPos;
861 actorID = script->owner1.
actorID;
872API_CALLABLE(SetActorYaw) {
873 Bytecode* args = script->ptrReadPos;
877 actorID = script->owner1.actorID;
884API_CALLABLE(GetActorYaw) {
885 Bytecode* args = script->ptrReadPos;
890 actorID = script->owner1.actorID;
899API_CALLABLE(SetPartYaw) {
900 Bytecode* args = script->ptrReadPos;
906 actorID = script->owner1.actorID;
916API_CALLABLE(GetPartYaw) {
917 Bytecode* args = script->ptrReadPos;
923 actorID = script->owner1.actorID;
933API_CALLABLE(SetActorJumpGravity) {
934 Bytecode* args = script->ptrReadPos;
939 actorID = script->owner1.actorID;
947API_CALLABLE(SetActorIdleJumpGravity) {
948 Bytecode* args = script->ptrReadPos;
953 actorID = script->owner1.actorID;
961API_CALLABLE(SetActorSpeed) {
962 Bytecode* args = script->ptrReadPos;
967 actorID = script->owner1.actorID;
976API_CALLABLE(SetActorIdleSpeed) {
977 Bytecode* args = script->ptrReadPos;
982 actorID = script->owner1.actorID;
990API_CALLABLE(SetPartJumpGravity) {
991 Bytecode* args = script->ptrReadPos;
997 actorID = script->owner1.actorID;
1007API_CALLABLE(SetPartMoveSpeed) {
1008 Bytecode* args = script->ptrReadPos;
1014 actorID = script->owner1.actorID;
1024API_CALLABLE(SetJumpAnimations) {
1025 Bytecode* args = script->ptrReadPos;
1034 actorID = script->owner1.
actorID;
1038 animJumpRise = *args++;
1039 animJumpFall = *args++;
1040 animJumpLand = *args++;
1051API_CALLABLE(AddActorPos) {
1052 Bytecode* args = script->ptrReadPos;
1058 actorID = script->owner1.
actorID;
1073API_CALLABLE(SetActorDispOffset) {
1074 Bytecode* args = script->ptrReadPos;
1080 actorID = script->owner1.
actorID;
1095API_CALLABLE(GetPartDispOffset) {
1096 Bytecode* args = script->ptrReadPos;
1100 s32 outX, outY, outZ;
1104 actorID = script->owner1.actorID;
1131API_CALLABLE(SetPartDispOffset) {
1132 Bytecode* args = script->ptrReadPos;
1139 actorID = script->owner1.actorID;
1162API_CALLABLE(AddPartDispOffset) {
1163 Bytecode* args = script->ptrReadPos;
1170 actorID = script->owner1.actorID;
1193API_CALLABLE(FreezeBattleState) {
1196 Bytecode* args = script->ptrReadPos;
1199 if (increaseFreeze) {
1208API_CALLABLE(GetActorVar) {
1209 Bytecode* args = script->ptrReadPos;
1215 actorID = script->owner1.actorID;
1226API_CALLABLE(SetActorVar) {
1227 Bytecode* args = script->ptrReadPos;
1233 actorID = script->owner1.actorID;
1244API_CALLABLE(AddActorVar) {
1245 Bytecode* args = script->ptrReadPos;
1252 actorID = script->owner1.actorID;
1259 state->varTable[index] += val;
1264API_CALLABLE(GetPartMovementVar) {
1265 Bytecode* args = script->ptrReadPos;
1272 actorID = script->owner1.actorID;
1284API_CALLABLE(SetPartMovementVar) {
1285 Bytecode* args = script->ptrReadPos;
1292 actorID = script->owner1.actorID;
1304API_CALLABLE(AddPartMovementVar) {
1305 Bytecode* args = script->ptrReadPos;
1312 actorID = script->owner1.actorID;
1324API_CALLABLE(SetActorRotation) {
1325 Bytecode* args = script->ptrReadPos;
1331 actorID = script->owner1.
actorID;
1355API_CALLABLE(SetActorRotationOffset) {
1356 Bytecode* args = script->ptrReadPos;
1362 actorID = script->owner1.
actorID;
1378API_CALLABLE(GetActorRotation) {
1379 Bytecode* args = script->ptrReadPos;
1385 actorID = script->owner1.
actorID;
1401API_CALLABLE(SetPartRotation) {
1402 Bytecode* args = script->ptrReadPos;
1409 actorID = script->owner1.actorID;
1418 actorPart->
rot.
x = x;
1419 actorPart->
rot.
y = y;
1420 actorPart->
rot.
z = z;
1425API_CALLABLE(SetPartRotationOffset) {
1426 Bytecode* args = script->ptrReadPos;
1433 actorID = script->owner1.actorID;
1449API_CALLABLE(GetPartRotation) {
1450 Bytecode* args = script->ptrReadPos;
1457 actorID = script->owner1.actorID;
1473API_CALLABLE(SetActorScale) {
1474 Bytecode* args = script->ptrReadPos;
1480 actorID = script->owner1.
actorID;
1496API_CALLABLE(SetActorScaleModifier) {
1497 Bytecode* args = script->ptrReadPos;
1503 actorID = script->owner1.
actorID;
1519API_CALLABLE(GetActorScale) {
1520 Bytecode* args = script->ptrReadPos;
1526 actorID = script->owner1.
actorID;
1542API_CALLABLE(SetPartScale) {
1543 Bytecode* args = script->ptrReadPos;
1550 actorID = script->owner1.actorID;
1566API_CALLABLE(GetPartScale) {
1567 Bytecode* args = script->ptrReadPos;
1574 actorID = script->owner1.actorID;
1590API_CALLABLE(GetBattleFlags) {
1595API_CALLABLE(SetBattleFlagBits) {
1596 Bytecode* args = script->ptrReadPos;
1609API_CALLABLE(GetBattleFlags2) {
1614API_CALLABLE(SetBattleFlagBits2) {
1615 Bytecode* args = script->ptrReadPos;
1628API_CALLABLE(SetActorFlags) {
1629 Bytecode* args = script->ptrReadPos;
1634 actorID = script->owner1.actorID;
1643API_CALLABLE(SetActorFlagBits) {
1644 Bytecode* args = script->ptrReadPos;
1651 actorID = script->owner1.
actorID;
1659 actor->
flags |= bits;
1661 actor->
flags &= ~bits;
1667API_CALLABLE(GetActorFlags) {
1668 Bytecode* args = script->ptrReadPos;
1673 actorID = script->owner1.actorID;
1683API_CALLABLE(SetPartFlags) {
1684 Bytecode* args = script->ptrReadPos;
1690 actorID = script->owner1.actorID;
1701API_CALLABLE(SetPartFlagBits) {
1702 Bytecode* args = script->ptrReadPos;
1710 actorID = script->owner1.actorID;
1720 actorPart->
flags |= bits;
1722 actorPart->
flags &= ~bits;
1728API_CALLABLE(SetPartTargetFlags) {
1729 Bytecode* args = script->ptrReadPos;
1736 actorID = script->owner1.actorID;
1747API_CALLABLE(SetPartTargetFlagBits) {
1748 Bytecode* args = script->ptrReadPos;
1756 actorID = script->owner1.actorID;
1774API_CALLABLE(GetPartFlags) {
1775 Bytecode* args = script->ptrReadPos;
1782 actorID = script->owner1.actorID;
1793API_CALLABLE(GetPartTargetFlags) {
1794 Bytecode* args = script->ptrReadPos;
1801 actorID = script->owner1.actorID;
1812API_CALLABLE(SetPartEventFlags) {
1813 Bytecode* args = script->ptrReadPos;
1820 actorID = script->owner1.actorID;
1831API_CALLABLE(SetPartEventBits) {
1832 Bytecode* args = script->ptrReadPos;
1841 actorID = script->owner1.actorID;
1860API_CALLABLE(GetPartEventFlags) {
1861 Bytecode* args = script->ptrReadPos;
1869 actorID = script->owner1.actorID;
1882API_CALLABLE(SetPartImmunityFlags) {
1883 Bytecode* args = script->ptrReadPos;
1890 actorID = script->owner1.actorID;
1901API_CALLABLE(SetPartImmunityBits) {
1902 Bytecode* args = script->ptrReadPos;
1911 actorID = script->owner1.actorID;
1930API_CALLABLE(HPBarToHome) {
1931 Bytecode* args = script->ptrReadPos;
1936 actorID = script->owner1.
actorID;
1953API_CALLABLE(HPBarToCurrent) {
1954 Bytecode* args = script->ptrReadPos;
1959 actorID = script->owner1.
actorID;
1976API_CALLABLE(HideHPBar) {
1977 Bytecode* args = script->ptrReadPos;
1981 actorID = script->owner1.actorID;
1989API_CALLABLE(SetHPBarOffset) {
1990 Bytecode* args = script->ptrReadPos;
1996 actorID = script->owner1.
actorID;
2017API_CALLABLE(SetActorStatusOffsets) {
2018 Bytecode* args = script->ptrReadPos;
2021 s32 iconX, iconY, textX, textY;
2024 actorID = script->owner1.
actorID;
2041API_CALLABLE(SummonEnemy) {
2043 s32* args = script->ptrReadPos;
2049 u16 enemyID1, enemyID2;
2050 s32 priority1, priority2;
2053 if (isInitialCall) {
2054 script->functionTemp[0] = 0;
2057 switch (script->functionTemp[0]) {
2061 script->functionTemp[0] = 1;
2064 actor2 = script->functionTempPtr[1];
2078 if (script->functionTemp[2]) {
2079 basePriority = -1000;
2081 basePriority = 1000;
2084 for (i = 0; i < numEnemies - 1; i++) {
2085 for (j = i + 1; j < numEnemies; j++) {
2086 enemyID1 = enemyIDs[i];
2087 actor1 = battleStatus->
enemyActors[enemyID1 & 0xFF];
2089 if (actor1 == actor2) {
2090 priority1 += basePriority;
2092 enemyID2 = enemyIDs[j];
2093 actor1 = battleStatus->
enemyActors[enemyID2 & 0xFF];
2095 if (actor1 == actor2) {
2096 priority2 += basePriority;
2098 if (priority1 < priority2) {
2099 enemyIDs[i] = enemyID2;
2100 enemyIDs[j] = enemyID1;
2106 for (i = 0; i < numEnemies; i++){
2107 if (battleStatus->
enemyActors[enemyIDs[i] & 0xFF] == actor2) {
2111 if (script->functionTemp[2] == 0) {
2123 script->varTable[0] = actor2->
actorID;
2129API_CALLABLE(GetOwnerID) {
2130 Bytecode* args = script->ptrReadPos;
2131 s32 outVar = *args++;
2137API_CALLABLE(SetOwnerID) {
2138 Bytecode* args = script->ptrReadPos;
2141 script->owner1.actorID = actorID;
2145API_CALLABLE(ActorExists) {
2147 Bytecode* args = script->ptrReadPos;
2152 actorID = script->owner1.actorID;
2164API_CALLABLE(GetPartAnimInstanceID) {
2165 Bytecode* args = script->ptrReadPos;
2168 s32 outVar = *args++;
2173 actorID = script->owner1.actorID;
2183API_CALLABLE(GetPartAnimNotify) {
2184 Bytecode* args = script->ptrReadPos;
2187 s32 outVar = *args++;
2192 actorID = script->owner1.actorID;
2202API_CALLABLE(SetBattleMenuEnabledFlags) {
2203 Bytecode* args = script->ptrReadPos;
2204 s32 flagsValue = *args++;
2210API_CALLABLE(SetEnabledStarPowers) {
2211 Bytecode* args = script->ptrReadPos;
2212 s32 enabled = *args++;
2218API_CALLABLE(SetBattleInputMask) {
2219 Bytecode* args = script->ptrReadPos;
2226API_CALLABLE(SetBattleInputButtons) {
2227 Bytecode* args = script->ptrReadPos;
2229 s32 currentButtonsDown = *args++;
2230 s32 currentButtonsPressed = *args++;
2231 s32 currentButtonsHeld = *args++;
2240API_CALLABLE(CheckButtonPress) {
2241 Bytecode* args = script->ptrReadPos;
2250API_CALLABLE(CheckButtonHeld) {
2251 Bytecode* args = script->ptrReadPos;
2260API_CALLABLE(CheckButtonDown) {
2261 Bytecode* args = script->ptrReadPos;
2270API_CALLABLE(GetBattleState) {
2271 Bytecode* args = script->ptrReadPos;
2272 s32 outVar = *args++;
2278API_CALLABLE(SetBattleState) {
2279 Bytecode* args = script->ptrReadPos;
2286API_CALLABLE(WaitForState) {
2287 Bytecode* args = script->ptrReadPos;
2291 if (isInitialCall) {
2312API_CALLABLE(CancelEnemyTurn) {
2313 Bytecode* args = script->ptrReadPos;
2317 switch (cancelMode) {
2319 battleStatus->
unk_94 = 1;
2322 battleStatus->
unk_94 = -1;
2329API_CALLABLE(func_8026E260) {
2330 Bytecode* args = script->ptrReadPos;
2335 actorID = script->owner1.actorID;
2342API_CALLABLE(CreateCurrentPosTargetList) {
2343 Bytecode* args = script->ptrReadPos;
2352API_CALLABLE(CreateHomeTargetList) {
2353 Bytecode* args = script->ptrReadPos;
2362API_CALLABLE(InitTargetIterator) {
2363 Bytecode* args = script->ptrReadPos;
2373API_CALLABLE(SetOwnerTarget) {
2374 Bytecode* args = script->ptrReadPos;
2384API_CALLABLE(ChooseNextTarget) {
2385 Bytecode* args = script->ptrReadPos;
2421 curIdx = length - 1;
2425 if (curIdx >= length) {
2439API_CALLABLE(func_8026E558) {
2440 Bytecode* args = script->ptrReadPos;
2457 i = script->owner1.actorID;
2469 }
else if (y < 85.0f) {
2471 }
else if (y < 100.0f) {
2479 }
else if (x < 65.0f) {
2481 }
else if (x < 105.0f) {
2498 if (target->
column == column && target->
layer == layer && target->
row < row) {
2509 if (target->
column == column && target->
layer == layer && target->
row < row) {
2520 if (target->
column == column && target->
layer == layer && target->
row < row) {
2532API_CALLABLE(GetTargetListLength) {
2533 Bytecode* args = script->ptrReadPos;
2539API_CALLABLE(GetOwnerTarget) {
2540 Bytecode* args = script->ptrReadPos;
2542 s32 actorID = *args++;
2543 s32 partID = *args++;
2551API_CALLABLE(func_8026E914) {
2552 Bytecode* args = script->ptrReadPos;
2553 s32 temp_v0 = *args++;
2554 s32 temp_s1 = *args++;
2562API_CALLABLE(GetPlayerActorID) {
2567API_CALLABLE(func_8026E9A0) {
2568 Bytecode* args = script->ptrReadPos;
2581API_CALLABLE(GetDistanceToGoal) {
2582 Bytecode* args = script->ptrReadPos;
2584 s32 outVar = *args++;
2589 actorID = script->owner1.
actorID;
2598API_CALLABLE(SetActorPaletteEffect) {
2599 Bytecode* args = script->ptrReadPos;
2607 actorID = script->owner1.actorID;
2616API_CALLABLE(SetActorPaletteSwapTimes) {
2617 Bytecode* args = script->ptrReadPos;
2625 actorID = script->owner1.actorID;
2639API_CALLABLE(SetActorPaletteSwapParams) {
2640 Bytecode* args = script->ptrReadPos;
2648 actorID = script->owner1.actorID;
2666API_CALLABLE(EnableActorPaletteEffects) {
2667 Bytecode* args = script->ptrReadPos;
2675 actorID = script->owner1.actorID;
2683 actorPart->
flags &= ~ACTOR_PART_FLAG_HAS_PAL_EFFECT;
2689API_CALLABLE(func_8026EDE4) {
2690 Bytecode* args = script->ptrReadPos;
2698 actorID = script->owner1.actorID;
2708API_CALLABLE(AddActorDecoration) {
2709 Bytecode* args = script->ptrReadPos;
2718 actorID = script->owner1.actorID;
2727API_CALLABLE(RemoveActorDecoration) {
2728 Bytecode* args = script->ptrReadPos;
2736 actorID = script->owner1.enemyID;
2745API_CALLABLE(ModifyActorDecoration) {
2746 Bytecode* args = script->ptrReadPos;
2755 actorID = script->owner1.
actorID;
2768API_CALLABLE(UseIdleAnimation) {
2770 s32* args = script->ptrReadPos;
2775 actorID = script->owner1.actorID;
2780 actor->
flags &= ~ACTOR_FLAG_USING_IDLE_ANIM;
2781 actor->
flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
2790API_CALLABLE(func_8026F1A0) {
2791 Bytecode* args = script->ptrReadPos;
2797 actorID = script->owner1.
actorID;
2802 if (temp_s0_3 == 0) {
2803 actor->
flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
2810API_CALLABLE(GetStatusFlags) {
2811 Bytecode* args = script->ptrReadPos;
2814 s32 outVar = *args++;
2826 actorID = script->owner1.actorID;
2892 for (partsTable = actor->
partsTable; partsTable != NULL; partsTable = partsTable->
nextPart) {
2901 switch (actorClass) {
2936API_CALLABLE(RemovePlayerBuffs) {
2941API_CALLABLE(SetPartAlpha) {
2943 s32* args = script->ptrReadPos;
2949 actorID = script->owner1.actorID;
2959API_CALLABLE(CreatePartShadow) {
2960 Bytecode* args = script->ptrReadPos;
2965 actorID = script->owner1.actorID;
2972API_CALLABLE(RemovePartShadow) {
2973 Bytecode* args = script->ptrReadPos;
2978 actorID = script->owner1.actorID;
2985API_CALLABLE(SetEndBattleFadeOutRate) {
2990API_CALLABLE(SetBattleVar) {
2991 Bytecode* args = script->ptrReadPos;
2999API_CALLABLE(GetBattleVar) {
3000 Bytecode* args = script->ptrReadPos;
3007API_CALLABLE(ResetAllActorSounds) {
3011 actorID = script->owner1.actorID;
3018API_CALLABLE(SetActorSounds) {
3019 Bytecode* args = script->ptrReadPos;
3027 actorID = script->owner1.
actorID;
3035 switch (soundType) {
3061API_CALLABLE(ResetActorSounds) {
3062 Bytecode* args = script->ptrReadPos;
3070 actorID = script->owner1.
actorID;
3078 switch (soundType) {
3104API_CALLABLE(SetPartSounds) {
3105 Bytecode* args = script->ptrReadPos;
3114 actorID = script->owner1.actorID;
3123 switch (soundType) {
3149API_CALLABLE(SetActorType) {
3150 Bytecode* args = script->ptrReadPos;
3156 actorID = script->owner1.
actorID;
3170API_CALLABLE(ShowShockEffect) {
3174 actorID = script->owner1.actorID;
3181API_CALLABLE(GetActorAttackBoost) {
3182 Bytecode* args = script->ptrReadPos;
3187 enemyID = script->owner1.enemyID;
3190 attackBoost = *args++;
3195API_CALLABLE(GetActorDefenseBoost) {
3196 Bytecode* args = script->ptrReadPos;
3201 enemyID = script->owner1.enemyID;
3204 defenseBoost = *args++;
3209API_CALLABLE(BoostAttack) {
3210 Bytecode* args = script->ptrReadPos;
3219 if (isInitialCall) {
3220 script->functionTemp[0] = 0;
3223 if (script->functionTemp[0] == 0) {
3226 actorID = script->owner1.actorID;
3230 script->functionTempPtr[1] = actor;
3231 script->functionTemp[2] = attackBoost;
3243 script->functionTemp[3] = 5;
3244 script->functionTemp[0] = 1;
3247 actor = script->functionTempPtr[1];
3248 attackBoost = script->functionTemp[2];
3261 flags2 = actor->
flags;
3272 switch (script->functionTemp[0]) {
3274 if (script->functionTemp[3] == 0) {
3275 fx_radial_shimmer(2, x1, y1, z1, 1.0f, 30);
3277 script->functionTemp[3] = 30;
3278 script->functionTemp[0] = 2;
3280 script->functionTemp[3]--;
3285 if (script->functionTemp[3] == 0) {
3294 fx_stat_change(attackBoost - 1, x2, y2, z2, 1.0f, 60);
3295 script->functionTemp[3] = 15;
3296 script->functionTemp[0] = 3;
3298 script->functionTemp[3]--;
3303 if (script->functionTemp[3] == 0) {
3305 script->functionTemp[0] = 4;
3307 script->functionTemp[3]--;
3314 script->functionTemp[3] = 10;
3315 script->functionTemp[0] = 5;
3319 if (script->functionTemp[3] != 0) {
3320 script->functionTemp[3]--;
3332API_CALLABLE(BoostDefense) {
3333 Bytecode* args = script->ptrReadPos;
3342 if (isInitialCall) {
3343 script->functionTemp[0] = 0;
3346 if (script->functionTemp[0] == 0) {
3349 actorID = script->owner1.actorID;
3353 script->functionTempPtr[1] = actor;
3354 script->functionTemp[2] = defenseBoost;
3367 script->functionTemp[3] = 5;
3368 script->functionTemp[0] = 1;
3371 actor = script->functionTempPtr[1];
3372 defenseBoost = script->functionTemp[2];
3385 flags2 = actor->
flags;
3396 switch (script->functionTemp[0]) {
3398 if (script->functionTemp[3] == 0) {
3399 fx_radial_shimmer(2, x1, y1, z1, 1.0f, 30);
3401 script->functionTemp[3] = 30;
3402 script->functionTemp[0] = 2;
3404 script->functionTemp[3]--;
3409 if (script->functionTemp[3] == 0) {
3418 fx_stat_change(defenseBoost + 5, x2, y2, z2, 1.0f, 60);
3419 script->functionTemp[3] = 15;
3420 script->functionTemp[0] = 3;
3422 script->functionTemp[3]--;
3427 if (script->functionTemp[3] == 0) {
3429 script->functionTemp[0] = 4;
3431 script->functionTemp[3]--;
3438 script->functionTemp[3] = 10;
3439 script->functionTemp[0] = 5;
3443 if (script->functionTemp[3] != 0) {
3444 script->functionTemp[3]--;
3456API_CALLABLE(VanishActor) {
3457 Bytecode* args = script->ptrReadPos;
3464 if (isInitialCall) {
3465 script->functionTemp[0] = 0;
3468 if (script->functionTemp[0] == 0) {
3471 actorID = script->owner1.actorID;
3475 script->functionTemp[1] = (s32) actor;
3476 script->functionTemp[2] = vanished;
3489 script->functionTemp[3] = 5;
3490 script->functionTemp[0] = 1;
3493 actor = script->functionTempPtr[1];
3494 vanished = script->functionTemp[2];
3507 switch (script->functionTemp[0]) {
3509 if (script->functionTemp[3] == 0) {
3510 fx_radial_shimmer(3, x, y, z, 1.0f, 30);
3512 script->functionTemp[3] = 30;
3513 script->functionTemp[0] = 2;
3515 script->functionTemp[3]--;
3520 if (script->functionTemp[3] == 0) {
3525 script->functionTemp[3] = 15;
3526 script->functionTemp[0] = 3;
3528 script->functionTemp[3]--;
3533 if (script->functionTemp[3] == 0) {
3535 script->functionTemp[0] = 4;
3537 script->functionTemp[3]--;
3544 script->functionTemp[3] = 10;
3545 script->functionTemp[0] = 5;
3549 if (script->functionTemp[3] != 0) {
3550 script->functionTemp[3]--;
3562API_CALLABLE(ElectrifyActor) {
3563 Bytecode* args = script->ptrReadPos;
3570 if (isInitialCall) {
3571 script->functionTemp[0] = 0;
3574 if (script->functionTemp[0] == 0) {
3577 actorID = script->owner1.actorID;
3581 script->functionTempPtr[1] = actor;
3582 script->functionTemp[2] = electrified;
3595 script->functionTemp[3] = 5;
3596 script->functionTemp[0] = 1;
3599 actor = script->functionTempPtr[1];
3600 electrified = script->functionTemp[2];
3613 switch (script->functionTemp[0]) {
3615 if (script->functionTemp[3] == 0) {
3616 fx_snaking_static(8, x, y, z, 1.0f, 30);
3618 script->functionTemp[3] = 30;
3619 script->functionTemp[0] = 2;
3621 script->functionTemp[3]--;
3626 if (script->functionTemp[3] == 0) {
3631 script->functionTemp[3] = 15;
3632 script->functionTemp[0] = 3;
3634 script->functionTemp[3]--;
3639 if (script->functionTemp[3] == 0) {
3641 script->functionTemp[0] = 4;
3643 script->functionTemp[3]--;
3650 script->functionTemp[3] = 10;
3651 script->functionTemp[0] = 5;
3655 if (script->functionTemp[3] != 0) {
3656 script->functionTemp[3]--;
3668API_CALLABLE(HealActor) {
3669 Bytecode* args = script->ptrReadPos;
3679 if (isInitialCall) {
3680 script->functionTemp[0] = 0;
3683 if (script->functionTemp[0] == 0) {
3686 actorID = script->owner1.enemyID;
3691 script->functionTempPtr[1] = actor;
3692 script->functionTemp[2] = hpBoost;
3701 script->functionTemp[3] = 5;
3702 script->functionTemp[0] = 1;
3705 actor = script->functionTempPtr[1];
3706 hpBoost = script->functionTemp[2];
3719 flags2 = actor->
flags;
3730 switch (script->functionTemp[0]) {
3732 if (script->functionTemp[3] == 0) {
3734 fx_recover(0, x2, y2, z2, hpBoost);
3736 script->functionTemp[3] = 30;
3737 script->functionTemp[0] = 2;
3739 script->functionTemp[3]--;
3744 if (script->functionTemp[3] == 0) {
3747 actor->
curHP += hpBoost;
3752 script->functionTemp[3] = 15;
3753 script->functionTemp[0] = 3;
3755 script->functionTemp[3]--;
3760 if (script->functionTemp[3] == 0) {
3766 script->functionTemp[0] = 4;
3768 script->functionTemp[3]--;
3774 script->functionTemp[3] = 10;
3775 script->functionTemp[0] = 5;
3779 if (script->functionTemp[3] != 0) {
3780 script->functionTemp[3]--;
3792API_CALLABLE(WaitForBuffDone) {
3800API_CALLABLE(CopyBuffs) {
3801 Bytecode* args = script->ptrReadPos;
3807 actorID = script->owner1.enemyID;
3813 actorID = script->owner1.enemyID;
Actor * create_actor(Formation formation)
void set_actor_home_position(s32 actorID, f32 x, f32 y, f32 z)
s32 count_targets(Actor *actor, s32 targetHomeIndex, s32 targetSelectionFlags)
void set_part_absolute_position(s32 actorID, s32 partID, f32 x, f32 y, f32 z)
void set_part_goal_to_actor_part(ActorPartMovement *movement, s32 actorID, s32 partID)
void set_actor_current_position(s32 actorID, f32 x, f32 y, f32 z)
Actor * get_actor(s32 actorID)
void set_goal_pos_to_part(ActorState *state, s32 actorID, s32 partID)
s32 get_nearest_home_index(f32 x, f32 y, f32 z)
BattleArea gBattleAreas[]
struct ActorPartMovement * movement
struct ActorBlueprint * actorBlueprint
struct Evt * handleEventScript
struct ActorPart * partsTable
struct SelectableTarget targetData[24]
struct ActorPart * nextPart
struct DecorationTable * decorationTable
DecorationData decorData[2]
@ ACTOR_SOUND_WALK_INCREMENT
@ ACTOR_SOUND_FLY_INCREMENT
@ BTL_MSG_ENEMY_TRANSPARENT
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
@ STATUS_FLAG_ATTACK_BOOST
@ STATUS_FLAG_DEFENSE_BOOST
@ STATUS_FLAG_TRANSPARENT
@ RENDER_MODE_SURFACE_XLU_LAYER3
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
@ ACTOR_FLAG_USING_IDLE_ANIM
@ ACTOR_PART_FLAG_HAS_PAL_EFFECT
@ ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION
@ ACTOR_PART_FLAG_TRANSPARENT
void btl_show_variable_battle_message(s32, s32, s32)
s32 evt_get_variable(Evt *script, Bytecode var)
s32 player_team_is_ability_active(Actor *actor, s32 ability)
void show_recovery_shimmer(f32 x, f32 y, f32 z, s32 arg3)
void reset_all_actor_sounds(Actor *)
void remove_player_buffs(s32)
void btl_cam_use_preset_immediately(s32)
void hide_actor_health_bar(Actor *)
void btl_cam_set_zoom(s16)
f32 evt_set_float_variable(Evt *script, Bytecode var, f32 value)
void dispatch_event_actor(Actor *, s32)
void clear_actor_static_pal_adjustments(Actor *)
void add_part_decoration(ActorPart *part, s32 decorationIndex, s32 decorationType)
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void load_tattle_flags(s32)
void set_part_glow_pal(ActorPart *, s32)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
void btl_cam_disable_clamp_x(void)
void create_home_target_list(Actor *actor)
void btl_cam_use_preset(s32)
void btl_cam_target_actor(s32)
s32 inflict_status(Actor *, s32, s32)
void btl_cam_set_zoffset(s16)
ActorPart * get_actor_part(Actor *actor, s32 partID)
void show_start_recovery_shimmer(f32 x, f32 y, f32 z, s32 arg3)
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
void set_actor_anim_rate(s32 actorID, s32 partID, f32 rate)
void set_part_yaw(s32 actorID, s32 partID, s32 value)
void set_actor_yaw(s32 actorID, s32 yaw)
void remove_part_shadow(s32 actorID, s32 partID)
s32 does_script_exist(s32 id)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void set_part_pal_adjustment(ActorPart *, s32)
void btl_set_state(s32 battleState)
s32 btl_is_popup_displayed(void)
void apply_shock_effect(Actor *)
void create_current_pos_target_list(Actor *actor)
s32 is_actor_health_bar_visible(Actor *)
void remove_part_decoration(ActorPart *part, s32 decorationIndex)
void create_part_shadow(s32 actorID, s32 partID)
#define ACTOR_API_SKIP_ARG
ActorSounds bActorSoundTable[]
s16 delay[2]
Number of frames to wait between walk/fly sounds. Negative values are in distance.
struct Actor * partnerActor
struct Actor * playerActor
struct Actor * enemyActors[24]
s32 enabledStarPowersFlags
BattleStatus gBattleStatus
Vec3s StandardActorHomePositions[]