123 if (handleEventScript !=
NULL) {
271 target->lastDamageTaken = 0;
405 target->hpChangeCounter = 0;
435 && (
target->stoneStatus == 0)
458 if (
target->stoneStatus == 0) {
481 target->hpChangeCounter = 0;
512 target->hpChangeCounter = 0;
841 if (actor->
curHP <= 0) {
903 actorID =
script->owner1.actorID;
916 actorID =
script->owner1.actorID;
929 actorID =
script->owner1.actorID;
1001 actorID =
script->owner1.actorID;
1015 actorID =
script->owner1.actorID;
1028 f32 posX, posY, posZ;
1033 script->functionTemp[0] = 0;
1036 if (
script->functionTemp[0] == 0) {
1039 actorID =
script->owner1.enemyID;
1045 script->functionTemp[3] = 0;
1047 script->functionTemp[3] |= 1;
1050 script->functionTemp[3] |= 2;
1067 posX = (
goalX - posX);
1068 posY = (
goalY - posY);
1069 posZ = (
goalZ - posZ);
1086 if (
script->functionTemp[2] != 0) {
1092 script->functionTemp[0] = 1;
1095 actor =
script->functionTempPtr[1];
1120 if (
script->functionTemp[3] & 1) {
1126 if (
script->functionTemp[2] != 0) {
1136 f32 posX, posY, posZ;
1144 if (!
script->functionTemp[0]) {
1148 actorID =
script->owner1.actorID;
1152 movement = &actor->
fly;
1172 posX = (
goalX - posX);
1173 posY = (
goalY - posY);
1174 posZ = (
goalZ - posZ);
1193 actor =
script->functionTempPtr[1];
1194 movement = &actor->
fly;
1208 if (
script->functionTemp[3] != 0) {
1223 f32 posX, posY, posZ;
1232 if (!
script->functionTemp[0]) {
1236 actorID =
script->owner1.actorID;
1240 state = &actor->
state;
1257 posX = (posX -
goalX);
1258 posY = (posY -
goalY);
1259 posZ = (posZ -
goalZ);
1281 actor =
script->functionTempPtr[1];
1282 state = &actor->
state;
1311 f32 posX, posY, posZ;
1319 if (!
script->functionTemp[0]) {
1322 actorID =
script->owner1.enemyID;
1344 posX = (
goalX - posX);
1345 posY = (
goalY - posY);
1346 posZ = (
goalZ - posZ);
1369 actor =
script->functionTempPtr[1];
1372 switch (
script->functionTemp[0]) {
1379 script->functionTemp[0] = 2;
1389 script->functionTemp[0] = 3;
1416 if (!
script->functionTemp[0]) {
1420 actorID =
script->owner1.actorID;
1424 script->functionTempPtr[1] = actor;
1431 actor =
script->functionTempPtr[1];
1453 f32 posX, posY, posZ;
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];
1531 f32 posX, posY, posZ;
1538 if (!
script->functionTemp[0]) {
1541 actorID =
script->owner1.enemyID;
1588 actor =
script->functionTempPtr[1];
1592 if (
script->functionTemp[2] == 0) {
1655 f32 posX, posY, posZ;
1663 if (!
script->functionTemp[0]) {
1666 actorID =
script->owner1.actorID;
1669 movement = &actor->
fly;
1711 actor =
script->functionTempPtr[1];
1712 movement = &actor->
fly;
1715 if (movement->
speed < 4.0f) {
1741 s32 actorID, partID;
1742 f32 posX, posY, posZ;
1747 script->functionTemp[0] = 0;
1750 if (
script->functionTemp[0] == 0) {
1753 actorID =
script->owner1.actorID;
1759 script->functionTempPtr[1] = actor;
1761 movement =
part->movement;
1788 posX = (
goalX - posX);
1789 posY = (
goalY - posY);
1790 posZ = (
goalZ - posZ);
1801 if (
part->partTypeData[4] != 0) {
1804 script->functionTemp[0] = 1;
1808 movement =
part->movement;
1818 if (
script->functionTemp[3] != 0) {
1835 s32 actorID, partID;
1836 f32 posX, posY, posZ;
1840 script->functionTemp[0] = 0;
1843 if (
script->functionTemp[0] == 0) {
1846 actorID =
script->owner1.actorID;
1852 script->functionTempPtr[1] = actor;
1854 movement =
part->movement;
1880 posX = (
goalX - posX);
1881 posY = (
goalY - posY);
1882 posZ = (
goalZ - posZ);
1892 if (
part->partTypeData[4] != 0) {
1895 script->functionTemp[0] = 1;
1899 movement =
part->movement;
1926 script->functionTemp[0] = 0;
1929 if (
script->functionTemp[0] == 0) {
1934 actorID =
script->owner1.actorID;
1939 script->functionTempPtr[1] = actor;
1941 movement =
part->movement;
1945 script->functionTemp[0] = 1;
1949 movement =
part->movement;
1957 if (
part->absolutePos.y < 0.0f) {
1958 part->absolutePos.y = 0.0f;
1971 s32 actorID, partID;
1972 f32 posX, posY, posZ;
1977 script->functionTemp[0] = 0;
1980 if (
script->functionTemp[0] == 0) {
1983 actorID =
script->owner1.actorID;
1989 script->functionTempPtr[1] = actor;
1991 movement =
part->movement;
2021 if (
part->actorTypeData2b[0] >= 0) {
2022 movement->
dist =
part->actorTypeData2b[0] + 1;
2024 movement->
dist = -(
part->actorTypeData2b[0] + 1);
2026 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2029 script->functionTemp[0] = 1;
2033 movement =
part->movement;
2034 actor =
script->functionTempPtr[1];
2046 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] != 0) {
2047 if (
part->actorTypeData2b[0] >= 0) {
2049 if (
part->actorTypeData2b[0] < movement->
dist) {
2053 if (
part->partTypeData[0] != 0) {
2057 if (
part->partTypeData[1] != 0) {
2063 movement->
dist += 1.0f;
2064 if (-
part->actorTypeData2b[0] <= movement->
dist) {
2068 if (
part->partTypeData[0] != 0) {
2072 if (
part->partTypeData[1] != 0) {
2086 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2108 return start + (end - start) *
elapsed / duration;
2110 return start +
SQ(
elapsed) * (end - start) /
SQ(duration);
2124 timeLeft = duration -
elapsed;
2125 return start + (end - start) - ((
SQ(timeLeft) * (end - start))) /
SQ(duration);
2128 timeLeft = duration -
elapsed;
2132 timeLeft = duration -
elapsed;
2140 return end - (end - start) *
absMag;
2162 f32 posX, posY, posZ;
2171 actorID =
script->owner1.enemyID;
2181 if (
script->functionTemp[3] >= 100) {
2182 script->functionTemp[3] -= 100;
2228 actor =
script->functionTempPtr[1];
2301 offsetY = -offsetY * -
actorState->moveArcAmplitude;
2304 offsetY = offsetY *
actorState->moveArcAmplitude;
2317 f32 posX, posY, posZ;
2326 actorID =
script->owner1.enemyID;
2329 movement = &actor->
fly;
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;
2421 f32 posX, posY, posZ;
2430 actorID =
script->owner1.actorID;
2436 script->functionTempPtr[1] = actor;
2448 posX =
part->absolutePos.x;
2454 posY =
part->absolutePos.y;
2460 posZ =
part->absolutePos.z;
2477 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2483 if (
part->actorTypeData2b[1] >= 0) {
2491 actor =
script->functionTempPtr[1];
2502 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2508 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] != 0) {
2509 if (
part->actorTypeData2b[1] >= 0) {
2515 if (
part->partTypeData[2] != 0) {
2519 if (
part->partTypeData[3] != 0) {
2530 if (
part->partTypeData[2] != 0) {
2534 if (
part->partTypeData[3] != 0) {
2576 actorID =
script->owner1.actorID;
2661 actorID =
script->owner1.actorID;
2688 if (actor ==
battleStatus->enemyActors[enemyIDs[i] & 0xFF]) {
2707 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
2723 actorID =
script->owner1.enemyID;
2728 if (
dropper->actorBlueprint->level == 0.0f) {
2740 ntd = (
ntd + 50.0f) / 100.0f;
2774 actorID =
script->owner1.actorID;
2789 actorID =
script->owner1.actorID;
2804 actorID =
script->owner1.actorID;
2819 actorID =
script->owner1.actorID;
2843 actorID =
script->owner1.enemyID;
2923 actorID =
script->owner1.actorID;
2963 actorID =
script->owner1.enemyID;
3054 actorID =
script->owner1.actorID;
3065 actorID =
script->owner1.actorID;
3076 actorID =
script->owner1.actorID;
3092 actorID =
script->owner1.actorID;
3101 part->targetOffset.x = x;
3102 part->targetOffset.y = y;
3114 actorID =
script->owner1.actorID;
3132 actorID =
script->owner1.actorID;
3141 part->projectileTargetOffset.x =
dx;
3142 part->projectileTargetOffset.y =
dy;
3195 actorID =
script->owner1.actorID;
3228 actorID =
script->owner1.actorID;
3295 actorID =
script->owner1.actorID;
3301 part->size.y = sizeY;
3305 part->size.x = sizeX;
3308 part->shadowScale =
part->size.x / 24.0;
3319 actorID =
script->owner1.actorID;
3332 actorID =
script->owner1.actorID;
3345 actorID =
script->owner1.actorID;
3371 if (
it->idleAnimations !=
NULL) {
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)
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
union Evt::@8 owner1
Initially -1.
EvtScript * takeTurnSource
struct ActorPart * nextPart
#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 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)
BattleStatus gBattleStatus