122 if (handleEventScript !=
NULL) {
270 target->lastDamageTaken = 0;
404 target->hpChangeCounter = 0;
434 && (
target->stoneStatus == 0)
457 if (
target->stoneStatus == 0) {
480 target->hpChangeCounter = 0;
511 target->hpChangeCounter = 0;
840 if (actor->
curHP <= 0) {
902 actorID =
script->owner1.actorID;
915 actorID =
script->owner1.actorID;
928 actorID =
script->owner1.actorID;
1000 actorID =
script->owner1.actorID;
1014 actorID =
script->owner1.actorID;
1027 f32 posX, posY, posZ;
1032 script->functionTemp[0] = 0;
1035 if (
script->functionTemp[0] == 0) {
1038 actorID =
script->owner1.enemyID;
1044 script->functionTemp[3] = 0;
1046 script->functionTemp[3] |= 1;
1049 script->functionTemp[3] |= 2;
1066 posX = (
goalX - posX);
1067 posY = (
goalY - posY);
1068 posZ = (
goalZ - posZ);
1085 if (
script->functionTemp[2] != 0) {
1091 script->functionTemp[0] = 1;
1094 actor =
script->functionTempPtr[1];
1119 if (
script->functionTemp[3] & 1) {
1125 if (
script->functionTemp[2] != 0) {
1135 f32 posX, posY, posZ;
1143 if (!
script->functionTemp[0]) {
1147 actorID =
script->owner1.actorID;
1151 movement = &actor->
fly;
1171 posX = (
goalX - posX);
1172 posY = (
goalY - posY);
1173 posZ = (
goalZ - posZ);
1192 actor =
script->functionTempPtr[1];
1193 movement = &actor->
fly;
1207 if (
script->functionTemp[3] != 0) {
1222 f32 posX, posY, posZ;
1231 if (!
script->functionTemp[0]) {
1235 actorID =
script->owner1.actorID;
1239 state = &actor->
state;
1256 posX = (posX -
goalX);
1257 posY = (posY -
goalY);
1258 posZ = (posZ -
goalZ);
1280 actor =
script->functionTempPtr[1];
1281 state = &actor->
state;
1310 f32 posX, posY, posZ;
1318 if (!
script->functionTemp[0]) {
1321 actorID =
script->owner1.enemyID;
1343 posX = (
goalX - posX);
1344 posY = (
goalY - posY);
1345 posZ = (
goalZ - posZ);
1368 actor =
script->functionTempPtr[1];
1371 switch (
script->functionTemp[0]) {
1378 script->functionTemp[0] = 2;
1388 script->functionTemp[0] = 3;
1415 if (!
script->functionTemp[0]) {
1419 actorID =
script->owner1.actorID;
1423 script->functionTempPtr[1] = actor;
1430 actor =
script->functionTempPtr[1];
1452 f32 posX, posY, posZ;
1456 script->functionTemp[0] = 0;
1459 if (
script->functionTemp[0] == 0) {
1463 actorID =
script->owner1.enemyID;
1466 state = &actor->
state;
1467 script->functionTempPtr[1] = actor;
1486 posX = (
goalX - posX);
1487 posY = (
goalY - posY);
1488 posZ = (
goalZ - posZ);
1502 script->functionTemp[0] = 1;
1505 actor =
script->functionTempPtr[1];
1530 f32 posX, posY, posZ;
1537 if (!
script->functionTemp[0]) {
1540 actorID =
script->owner1.enemyID;
1587 actor =
script->functionTempPtr[1];
1591 if (
script->functionTemp[2] == 0) {
1654 f32 posX, posY, posZ;
1662 if (!
script->functionTemp[0]) {
1665 actorID =
script->owner1.actorID;
1668 movement = &actor->
fly;
1710 actor =
script->functionTempPtr[1];
1711 movement = &actor->
fly;
1714 if (movement->
speed < 4.0f) {
1740 s32 actorID, partID;
1741 f32 posX, posY, posZ;
1746 script->functionTemp[0] = 0;
1749 if (
script->functionTemp[0] == 0) {
1752 actorID =
script->owner1.actorID;
1758 script->functionTempPtr[1] = actor;
1760 movement =
part->movement;
1787 posX = (
goalX - posX);
1788 posY = (
goalY - posY);
1789 posZ = (
goalZ - posZ);
1800 if (
part->partTypeData[4] != 0) {
1803 script->functionTemp[0] = 1;
1807 movement =
part->movement;
1817 if (
script->functionTemp[3] != 0) {
1834 s32 actorID, partID;
1835 f32 posX, posY, posZ;
1839 script->functionTemp[0] = 0;
1842 if (
script->functionTemp[0] == 0) {
1845 actorID =
script->owner1.actorID;
1851 script->functionTempPtr[1] = actor;
1853 movement =
part->movement;
1879 posX = (
goalX - posX);
1880 posY = (
goalY - posY);
1881 posZ = (
goalZ - posZ);
1891 if (
part->partTypeData[4] != 0) {
1894 script->functionTemp[0] = 1;
1898 movement =
part->movement;
1925 script->functionTemp[0] = 0;
1928 if (
script->functionTemp[0] == 0) {
1933 actorID =
script->owner1.actorID;
1938 script->functionTempPtr[1] = actor;
1940 movement =
part->movement;
1944 script->functionTemp[0] = 1;
1948 movement =
part->movement;
1956 if (
part->absolutePos.y < 0.0f) {
1957 part->absolutePos.y = 0.0f;
1970 s32 actorID, partID;
1971 f32 posX, posY, posZ;
1976 script->functionTemp[0] = 0;
1979 if (
script->functionTemp[0] == 0) {
1982 actorID =
script->owner1.actorID;
1988 script->functionTempPtr[1] = actor;
1990 movement =
part->movement;
2020 if (
part->actorTypeData2b[0] >= 0) {
2021 movement->
dist =
part->actorTypeData2b[0] + 1;
2023 movement->
dist = -(
part->actorTypeData2b[0] + 1);
2025 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2028 script->functionTemp[0] = 1;
2032 movement =
part->movement;
2033 actor =
script->functionTempPtr[1];
2045 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] != 0) {
2046 if (
part->actorTypeData2b[0] >= 0) {
2048 if (
part->actorTypeData2b[0] < movement->
dist) {
2052 if (
part->partTypeData[0] != 0) {
2056 if (
part->partTypeData[1] != 0) {
2062 movement->
dist += 1.0f;
2063 if (-
part->actorTypeData2b[0] <= movement->
dist) {
2067 if (
part->partTypeData[0] != 0) {
2071 if (
part->partTypeData[1] != 0) {
2085 if (
part->partTypeData[0] != 0 &&
part->partTypeData[1] == 0) {
2107 return start + (end - start) *
elapsed / duration;
2109 return start +
SQ(
elapsed) * (end - start) /
SQ(duration);
2123 timeLeft = duration -
elapsed;
2124 return start + (end - start) - ((
SQ(timeLeft) * (end - start))) /
SQ(duration);
2127 timeLeft = duration -
elapsed;
2131 timeLeft = duration -
elapsed;
2139 return end - (end - start) *
absMag;
2161 f32 posX, posY, posZ;
2170 actorID =
script->owner1.enemyID;
2180 if (
script->functionTemp[3] >= 100) {
2181 script->functionTemp[3] -= 100;
2227 actor =
script->functionTempPtr[1];
2300 offsetY = -offsetY * -
actorState->moveArcAmplitude;
2303 offsetY = offsetY *
actorState->moveArcAmplitude;
2316 f32 posX, posY, posZ;
2325 actorID =
script->owner1.enemyID;
2328 movement = &actor->
fly;
2365 movement->
angle = 0.0f;
2366 movement->
vel = 0.0f;
2369 actor =
script->functionTempPtr[1];
2370 movement = &actor->
fly;
2391 if (movement->
dist == 0.0f) {
2392 movement->
dist = 1.0f;
2420 f32 posX, posY, posZ;
2429 actorID =
script->owner1.actorID;
2435 script->functionTempPtr[1] = actor;
2447 posX =
part->absolutePos.x;
2453 posY =
part->absolutePos.y;
2459 posZ =
part->absolutePos.z;
2476 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2482 if (
part->actorTypeData2b[1] >= 0) {
2490 actor =
script->functionTempPtr[1];
2501 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] == 0) {
2507 if (
part->partTypeData[2] != 0 &&
part->partTypeData[3] != 0) {
2508 if (
part->actorTypeData2b[1] >= 0) {
2514 if (
part->partTypeData[2] != 0) {
2518 if (
part->partTypeData[3] != 0) {
2529 if (
part->partTypeData[2] != 0) {
2533 if (
part->partTypeData[3] != 0) {
2575 actorID =
script->owner1.actorID;
2660 actorID =
script->owner1.actorID;
2687 if (actor ==
battleStatus->enemyActors[enemyIDs[i] & 0xFF]) {
2706 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
2722 actorID =
script->owner1.enemyID;
2727 if (
dropper->actorBlueprint->level == 0.0f) {
2739 ntd = (
ntd + 50.0f) / 100.0f;
2773 actorID =
script->owner1.actorID;
2788 actorID =
script->owner1.actorID;
2803 actorID =
script->owner1.actorID;
2818 actorID =
script->owner1.actorID;
2842 actorID =
script->owner1.enemyID;
2922 actorID =
script->owner1.actorID;
2962 actorID =
script->owner1.enemyID;
3053 actorID =
script->owner1.actorID;
3064 actorID =
script->owner1.actorID;
3075 actorID =
script->owner1.actorID;
3091 actorID =
script->owner1.actorID;
3100 part->targetOffset.x = x;
3101 part->targetOffset.y = y;
3113 actorID =
script->owner1.actorID;
3131 actorID =
script->owner1.actorID;
3140 part->projectileTargetOffset.x =
dx;
3141 part->projectileTargetOffset.y =
dy;
3194 actorID =
script->owner1.actorID;
3227 actorID =
script->owner1.actorID;
3294 actorID =
script->owner1.actorID;
3300 part->size.y = sizeY;
3304 part->size.x = sizeX;
3307 part->shadowScale =
part->size.x / 24.0;
3318 actorID =
script->owner1.actorID;
3331 actorID =
script->owner1.actorID;
3344 actorID =
script->owner1.actorID;
3370 if (
it->idleAnimations !=
NULL) {
3441 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
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 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