11 while (
partIt !=
nullptr) {
122 if (handleEventScript !=
nullptr) {
269 target->lastDamageTaken = 0;
403 target->hpChangeCounter = 0;
433 && (
target->stoneStatus == 0)
456 if (
target->stoneStatus == 0) {
479 target->hpChangeCounter = 0;
510 target->hpChangeCounter = 0;
824 if (actor->
curHP <= 0) {
886 actorID =
script->owner1.actorID;
899 actorID =
script->owner1.actorID;
912 actorID =
script->owner1.actorID;
984 actorID =
script->owner1.actorID;
998 actorID =
script->owner1.actorID;
1011 f32 posX, posY, posZ;
1016 script->functionTemp[0] = 0;
1019 if (
script->functionTemp[0] == 0) {
1022 actorID =
script->owner1.enemyID;
1028 script->functionTemp[3] = 0;
1030 script->functionTemp[3] |= 1;
1033 script->functionTemp[3] |= 2;
1050 posX = (
goalX - posX);
1051 posY = (
goalY - posY);
1052 posZ = (
goalZ - posZ);
1069 if (
script->functionTemp[2] != 0) {
1075 script->functionTemp[0] = 1;
1078 actor =
script->functionTempPtr[1];
1103 if (
script->functionTemp[3] & 1) {
1109 if (
script->functionTemp[2] != 0) {
1119 f32 posX, posY, posZ;
1124 script->functionTemp[0] =
false;
1127 if (!
script->functionTemp[0]) {
1131 actorID =
script->owner1.actorID;
1135 movement = &actor->
fly;
1155 posX = (
goalX - posX);
1156 posY = (
goalY - posY);
1157 posZ = (
goalZ - posZ);
1173 script->functionTemp[0] =
true;
1176 actor =
script->functionTempPtr[1];
1177 movement = &actor->
fly;
1191 if (
script->functionTemp[3] != 0) {
1206 f32 posX, posY, posZ;
1212 script->functionTemp[0] =
false;
1215 if (!
script->functionTemp[0]) {
1219 actorID =
script->owner1.actorID;
1223 state = &actor->
state;
1240 posX = (posX -
goalX);
1241 posY = (posY -
goalY);
1242 posZ = (posZ -
goalZ);
1261 script->functionTemp[0] =
true;
1264 actor =
script->functionTempPtr[1];
1265 state = &actor->
state;
1294 f32 posX, posY, posZ;
1299 script->functionTemp[0] =
false;
1302 if (!
script->functionTemp[0]) {
1305 actorID =
script->owner1.enemyID;
1327 posX = (
goalX - posX);
1328 posY = (
goalY - posY);
1329 posZ = (
goalZ - posZ);
1349 script->functionTemp[0] =
true;
1352 actor =
script->functionTempPtr[1];
1355 switch (
script->functionTemp[0]) {
1362 script->functionTemp[0] = 2;
1372 script->functionTemp[0] = 3;
1396 script->functionTemp[0] =
false;
1399 if (!
script->functionTemp[0]) {
1403 actorID =
script->owner1.actorID;
1407 script->functionTempPtr[1] = actor;
1411 script->functionTemp[0] =
true;
1414 actor =
script->functionTempPtr[1];
1436 f32 posX, posY, posZ;
1440 script->functionTemp[0] = 0;
1443 if (
script->functionTemp[0] == 0) {
1447 actorID =
script->owner1.enemyID;
1450 state = &actor->
state;
1451 script->functionTempPtr[1] = actor;
1470 posX = (
goalX - posX);
1471 posY = (
goalY - posY);
1472 posZ = (
goalZ - posZ);
1486 script->functionTemp[0] = 1;
1489 actor =
script->functionTempPtr[1];
1514 f32 posX, posY, posZ;
1518 script->functionTemp[0] =
false;
1521 if (!
script->functionTemp[0]) {
1524 actorID =
script->owner1.enemyID;
1568 script->functionTemp[0] =
true;
1571 actor =
script->functionTempPtr[1];
1575 if (
script->functionTemp[2] == 0) {
1638 f32 posX, posY, posZ;
1643 script->functionTemp[0] =
false;
1646 if (!
script->functionTemp[0]) {
1649 actorID =
script->owner1.actorID;
1652 movement = &actor->
fly;
1691 script->functionTemp[0] =
true;
1694 actor =
script->functionTempPtr[1];
1695 movement = &actor->
fly;
1698 if (movement->
speed < 4.0f) {
1724 s32 actorID, partID;
1725 f32 posX, posY, posZ;
1730 script->functionTemp[0] = 0;
1733 if (
script->functionTemp[0] == 0) {
1736 actorID =
script->owner1.actorID;
1742 script->functionTempPtr[1] = actor;
1744 movement =
part->movement;
1771 posX = (
goalX - posX);
1772 posY = (
goalY - posY);
1773 posZ = (
goalZ - posZ);
1784 if (
part->partTypeData[4] != 0) {
1787 script->functionTemp[0] = 1;
1791 movement =
part->movement;
1801 if (
script->functionTemp[3] != 0) {
1818 s32 actorID, partID;
1819 f32 posX, posY, posZ;
1823 script->functionTemp[0] = 0;
1826 if (
script->functionTemp[0] == 0) {
1829 actorID =
script->owner1.actorID;
1835 script->functionTempPtr[1] = actor;
1837 movement =
part->movement;
1863 posX = (
goalX - posX);
1864 posY = (
goalY - posY);
1865 posZ = (
goalZ - posZ);
1875 if (
part->partTypeData[4] != 0) {
1878 script->functionTemp[0] = 1;
1882 movement =
part->movement;
1909 script->functionTemp[0] = 0;
1912 if (
script->functionTemp[0] == 0) {
1917 actorID =
script->owner1.actorID;
1922 script->functionTempPtr[1] = actor;
1924 movement =
part->movement;
1928 script->functionTemp[0] = 1;
1932 movement =
part->movement;
1940 if (
part->absolutePos.y < 0.0f) {
1941 part->absolutePos.y = 0.0f;
1954 s32 actorID, partID;
1955 f32 posX, posY, posZ;
1959 script->functionTemp[0] = 0;
1962 if (
script->functionTemp[0] == 0) {
1965 actorID =
script->owner1.actorID;
1971 script->functionTempPtr[1] = actor;
1973 movement =
part->movement;
2003 if (
part->actorTypeData2b[0] >= 0) {
2004 movement->
dist =
part->actorTypeData2b[0] + 1;
2006 movement->
dist = -(
part->actorTypeData2b[0] + 1);
2008 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2011 script->functionTemp[0] = 1;
2015 movement =
part->movement;
2016 actor =
script->functionTempPtr[1];
2028 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] != 0) {
2029 if (
part->actorTypeData2b[0] >= 0) {
2031 if (
part->actorTypeData2b[0] < movement->
dist) {
2035 if (
part->partTypeData[0] != 0) {
2039 if (
part->partTypeData[1] != 0) {
2045 movement->
dist += 1.0f;
2046 if (-
part->actorTypeData2b[0] <= movement->
dist) {
2050 if (
part->partTypeData[0] != 0) {
2054 if (
part->partTypeData[1] != 0) {
2068 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2090 return start + (end - start) *
elapsed / duration;
2092 return start +
SQ(
elapsed) * (end - start) /
SQ(duration);
2106 timeLeft = duration -
elapsed;
2107 return start + (end - start) - ((
SQ(timeLeft) * (end - start))) /
SQ(duration);
2110 timeLeft = duration -
elapsed;
2114 timeLeft = duration -
elapsed;
2122 return end - (end - start) *
absMag;
2144 f32 posX, posY, posZ;
2153 actorID =
script->owner1.enemyID;
2163 if (
script->functionTemp[3] >= 100) {
2164 script->functionTemp[3] -= 100;
2210 actor =
script->functionTempPtr[1];
2283 offsetY = -offsetY * -
actorState->moveArcAmplitude;
2286 offsetY = offsetY *
actorState->moveArcAmplitude;
2299 f32 posX, posY, posZ;
2308 actorID =
script->owner1.enemyID;
2311 movement = &actor->
fly;
2348 movement->
angle = 0.0f;
2349 movement->
vel = 0.0f;
2352 actor =
script->functionTempPtr[1];
2353 movement = &actor->
fly;
2374 if (movement->
dist == 0.0f) {
2375 movement->
dist = 1.0f;
2403 f32 posX, posY, posZ;
2412 actorID =
script->owner1.actorID;
2418 script->functionTempPtr[1] = actor;
2430 posX =
part->absolutePos.x;
2436 posY =
part->absolutePos.y;
2442 posZ =
part->absolutePos.z;
2459 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2465 if (
part->actorTypeData2b[1] >= 0) {
2473 actor =
script->functionTempPtr[1];
2484 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2490 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] != 0) {
2491 if (
part->actorTypeData2b[1] >= 0) {
2497 if (
part->partTypeData[2] != 0) {
2501 if (
part->partTypeData[3] != 0) {
2512 if (
part->partTypeData[2] != 0) {
2516 if (
part->partTypeData[3] != 0) {
2558 actorID =
script->owner1.actorID;
2643 actorID =
script->owner1.actorID;
2670 if (actor ==
battleStatus->enemyActors[enemyIDs[i] & 0xFF]) {
2689 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
2705 actorID =
script->owner1.enemyID;
2710 if (
dropper->actorBlueprint->level == 0.0f) {
2722 ntd = (
ntd + 50.0f) / 100.0f;
2756 actorID =
script->owner1.actorID;
2771 actorID =
script->owner1.actorID;
2786 actorID =
script->owner1.actorID;
2801 actorID =
script->owner1.actorID;
2824 actorID =
script->owner1.enemyID;
2904 actorID =
script->owner1.actorID;
2943 actorID =
script->owner1.enemyID;
3034 actorID =
script->owner1.actorID;
3045 actorID =
script->owner1.actorID;
3056 actorID =
script->owner1.actorID;
3072 actorID =
script->owner1.actorID;
3081 part->targetOffset.x = x;
3082 part->targetOffset.y = y;
3094 actorID =
script->owner1.actorID;
3112 actorID =
script->owner1.actorID;
3121 part->projectileTargetOffset.x =
dx;
3122 part->projectileTargetOffset.y =
dy;
3175 actorID =
script->owner1.actorID;
3208 actorID =
script->owner1.actorID;
3275 actorID =
script->owner1.actorID;
3281 part->size.y = sizeY;
3285 part->size.x = sizeX;
3288 part->shadowScale =
part->size.x / 24.0;
3299 actorID =
script->owner1.actorID;
3312 actorID =
script->owner1.actorID;
3325 actorID =
script->owner1.actorID;
3350 while (
it !=
nullptr) {
3351 if (
it->idleAnimations !=
nullptr) {
3421 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)
BSS s32 PopupMenu_SelectedIndex
s32 check_block_input(s32 buttonMask)
struct EffectInstance * disableEffect
struct Evt * takeTurnScript
EvtScript * handleEventSource
struct ActorBlueprint * actorBlueprint
struct Evt * handleEventScript
struct ActorPart * partsTable
struct SelectableTarget targetData[24]
EvtScript * handlePhaseSource
EvtScript * takeTurnSource
struct ActorPart * nextPart
union Evt::@10 owner1
Initially -1.
#define sfx_play_sound_at_position
struct DisableXFXData * disableX
EffectInstanceDataPtr data
#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 resume_all_script(s32 id)
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 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 cancel_action_rating_combo(Actor *)
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)
void show_next_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32 angle)
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 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)
f32 evt_get_float_variable(Evt *script, Bytecode var)
void btl_delete_actor(Actor *actor)
void suspend_all_script(s32 id)
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 snd_stop_sound(s32 soundID)
void set_npc_imgfx_all(s32 spriteIdx, ImgFXType imgfxType, s32 imgfxArg1, s32 imgfxArg2, s32 imgfxArg3, s32 imgfxArg4, s32 imgfxArg5)
BattleStatus gBattleStatus