calc_item_damage_enemy and some others (#641)

* SFX funcs, configure fix

* the actual rename (oops)

* 3 sprite funcs

* 2 funcz

* calc_item_damage_enemy and cleanup, others

* cleanup

* Warnings

* clean fx_api

* match npc_raycast_general and name npc_collision.c

* PR comment
This commit is contained in:
Ethan Roseman 2022-02-08 13:33:05 -05:00 committed by GitHub
parent 650d52d16a
commit 3a578399fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
120 changed files with 1726 additions and 2672 deletions

View File

@ -218,10 +218,10 @@ typedef struct PlayerData {
/* 0x001 */ s8 hammerLevel;
/* 0x002 */ s8 curHP;
/* 0x003 */ s8 curMaxHP;
/* 0x004 */ u8 hardMaxHP;
/* 0x004 */ s8 hardMaxHP;
/* 0x005 */ s8 curFP;
/* 0x006 */ s8 curMaxFP;
/* 0x007 */ u8 hardMaxFP;
/* 0x007 */ s8 hardMaxFP;
/* 0x008 */ s8 maxBP;
/* 0x009 */ s8 level;
/* 0x00A */ s8 hasActionCommands;
@ -854,7 +854,7 @@ typedef struct BattleStatus {
/* 0x000 */ s32 flags1;
/* 0x004 */ s32 flags2;
/* 0x008 */ s32 varTable[16];
/* 0x048 */ u8 currentSubmenu;
/* 0x048 */ s8 currentSubmenu;
/* 0x049 */ char unk_49[3];
/* 0x04C */ s8 unk_4C[16];
/* 0x05C */ s8 unk_5C[16];
@ -862,8 +862,8 @@ typedef struct BattleStatus {
/* 0x070 */ s16 menuDisableFlags; /* 1 = jump, 2 = hammer, 4 = items */
/* 0x072 */ char unk_72[2];
/* 0x074 */ s32 unk_74;
/* 0x078 */ u8 totalStarPoints;
/* 0x079 */ u8 pendingStarPoints; /* how many to add */
/* 0x078 */ s8 totalStarPoints;
/* 0x079 */ s8 pendingStarPoints; /* how many to add */
/* 0x07A */ u8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */
/* 0x07B */ u8 damageTaken;
/* 0x07C */ s8 changePartnerAllowed;
@ -1866,7 +1866,7 @@ typedef struct Actor {
/* 0x207 */ s8 extraCoinBonus;
/* 0x208 */ s8 unk_208;
/* 0x209 */ char unk_209[3];
/* 0x20C */ struct s32* statusTable;
/* 0x20C */ s32* statusTable;
/* 0x210 */ s8 debuff;
/* 0x211 */ s8 debuffDuration;
/* 0x212 */ s8 staticStatus; /* 0B = yes */
@ -2350,7 +2350,7 @@ typedef struct SaveMetadata {
typedef struct SpriteShadingLightSource {
/* 0x00 */ s8 flags;
/* 0x01 */ s8 rgb[3];
/* 0x01 */ Color_RGB8 rgb;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 falloff;
/* 0x14 */ s8 unk_14;
@ -2361,7 +2361,7 @@ typedef struct SpriteShadingProfile {
/* 0x00 */ s16 flags;
/* 0x02 */ char unk_02[0x2];
/* 0x04 */ SpriteShadingLightSource sources[7];
/* 0xAC */ s8 ambientColor[3];
/* 0xAC */ Color_RGB8 ambientColor;
/* 0xAF */ s8 ambientPower; // ?
} SpriteShadingProfile; // size = 0xB0

View File

@ -659,7 +659,7 @@ EffectInstance* fx_lens_flare(s32, f32, f32, f32, s32);
EffectInstance* fx_got_item_outline(s32, f32, f32, f32, f32, s32*);
EffectInstance* fx_spiky_white_aura(s32, f32, f32, f32, s32);
void fx_smoke_impact(s32, f32, f32, f32, f32, s32, f32, s32);
EffectInstance* fx_damage_indicator(s32, f32, f32, f32, f32, f32, s32, s32*);
EffectInstance* fx_damage_indicator(s32, f32, f32, f32, f32, f32, s32, EffectInstance**);
EffectInstance* fx_purple_ring(s32, f32, f32, f32, f32, f32, f32, f32);
EffectInstance* fx_flame(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_stars_burst(s32, f32, f32, f32, f32, f32, s32);
@ -694,7 +694,7 @@ void fx_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*);
EffectInstance* fx_blast(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_fire_flower(s32, f32, f32, f32, s32);
EffectInstance* fx_recover(s32, f32, f32, f32, s32);
EffectInstance* fx_disable_x(s32, f32, f32, f32, s32);
struct HudElement* fx_disable_x(s32, f32, f32, f32, s32);
EffectInstance* fx_bombette_breaking(s32, s32, s32, f32, s32, s32);
EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32);

View File

@ -507,6 +507,7 @@ enum SoundIDs {
SOUND_MENU_CHANGE_TAB = 0x000000C8,
SOUND_MENU_NEXT = 0x000000C9,
SOUND_MENU_BACK = 0x000000CA,
SOUND_D4 = 0x000000D4,
SOUND_HIT_PLAYER_NORMAL = 0x000000E1,
SOUND_HIT_PLAYER_FIRE = 0x000000E2,
SOUND_HIT_PLAYER_ICE = 0x000000E3,
@ -542,6 +543,7 @@ enum SoundIDs {
SOUND_METAL_GATE_CLOSE = 0x000001CA,
SOUND_1CB = 0x000001CB,
SOUND_1CC = 0x000001CC,
SOUND_215 = 0x00000215,
SOUND_MENU_ERROR = 0x0000021D,
SOUND_231 = 0x00000231,
SOUND_246 = 0x00000246,
@ -597,6 +599,7 @@ enum SoundIDs {
SOUND_MOLE_THROW = 0x000003E8,
SOUND_3F3 = 0x000003F3,
SOUND_THROW = 0x000003FA,
SOUND_749 = 0x00000749,
SOUND_759 = 0x00000759,
SOUND_2003 = 0x00002003,
SOUND_200D = 0x0000200D,
@ -2366,6 +2369,7 @@ enum BattleStatusFlags1 {
};
enum BattleStatusFlags2 {
BS_FLAGS2_1 = 0x00000001,
BS_FLAGS2_2 = 0x00000002,
BS_FLAGS2_4 = 0x00000004,
BS_FLAGS2_8 = 0x00000008,
@ -2390,9 +2394,13 @@ enum BattleStates2 {
BATTLE_STATES2_UNK_5 = 0x00000005,
BATTLE_STATES2_UNK_6 = 0x00000006,
BATTLE_STATES2_UNK_7 = 0x00000007,
BATTLE_STATES2_UNK_8 = 0x00000008,
BATTLE_STATES2_UNK_9 = 0x00000009,
BATTLE_STATES2_PLAYER_DEFEATED = 0x0000000A,
BATTLE_STATES2_UNK_B = 0x0000000B,
BATTLE_STATES2_UNK_C = 0x0000000C,
BATTLE_STATES2_UNK_F = 0x0000000F,
BATTLE_STATES2_UNK_10 = 0x00000010,
BATTLE_STATES2_UNK_14 = 0x00000014,
BATTLE_STATES2_UNK_15 = 0x00000015,
BATTLE_STATES2_UNK_16 = 0x00000016,

View File

@ -104,6 +104,8 @@ void func_80257DA4(void*);
void func_80254C50(Actor*);
void func_80258E14(void*);
void func_80254610(Actor*);
f32 func_800E34D8(void);
void func_800E4AD8(s32 arg0);
f32 player_check_collision_below(f32, s32* colliderID);
@ -207,6 +209,7 @@ Trigger* get_trigger_by_id(s32 triggerID);
Actor* get_actor(s32 actorID);
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
s32 add_coins(s32 amt);
s32 is_partner_ability_active(s32);
s32 phys_can_player_interact(void);
@ -329,12 +332,13 @@ void btl_state_update_22(void);
void btl_state_draw_22(void);
void btl_state_update_celebration(void);
void btl_draw_upgrade_windows(void);
void btl_draw_upgrade_windows(s32);
void btl_state_draw_celebration(void);
void func_8024F7C8(void);
void func_80266978(void);
void func_80266B14(void);
s32 func_8024E584(void);
void func_8024EE48(void);
void func_8024EEA8(void);
void func_80255FD8(void);
@ -512,6 +516,8 @@ void func_80138D88(s32, s32, s32, s32, f32);
void func_8013A4D0(void);
void btl_cam_set_target_pos(f32, f32, f32);
void btl_cam_unfreeze(void);
void deduct_current_move_fp(void);
void load_partner_actor(void);
void dispatch_event_partner(s32);
@ -643,9 +649,11 @@ void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3);
s32 func_8004A784(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5);
void base_UnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
void UnkNpcAIFunc1(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
void func_80266AF8(Actor*);
s32 func_80263230(Actor*, Actor*);
void func_80266EA8(ActorPart*, s32);
void func_80266E40(Actor*);
void func_80267018(Actor* actor, s32 arg1);
void remove_player_buffs(s32);
s32 is_actor_hp_bar_visible(Actor*);
@ -710,15 +718,22 @@ void btl_cam_target_actor(s32);
void btl_cam_set_zoom(s16);
void btl_cam_move(s16);
void func_8024E60C(void);
void dispatch_event_actor(Actor*, s32);
s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event);
void btl_show_variable_battle_message(s32, s32, s32);
s32 btl_is_popup_displayed(void);
void func_8024E3D8(s32);
s32 inflict_status(Actor*, s32, s32);
s32 try_inflict_status(Actor*, s32, s32);
s32 inflict_status_set_duration(Actor* actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration);
void mdl_set_all_fog_mode(s32);
void load_model_animator_tree(s32, StaticAnimatorNode**);
s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration);
s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags);
void func_8024EDC0(void);
void update_effects(void);
@ -754,9 +769,14 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32, s32, s32);
void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a);
s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion);
s32 calc_partner_test_enemy(void);
void disable_actor_blur(Actor*);
void reset_actor_blur(Actor*);
void enable_actor_blur(Actor*);
void func_80251474(Actor*);
s32 func_8025C8A0(s32, ActorPart*);
void func_8025CD28(s32, ActorPart*);
void func_8025CEC8(ActorPart*);
void _remove_part_decoration(ActorPart* part, s32 decorationIndex);
void func_8025D158(ActorPart*, s32);
void func_8025D290(ActorPart*, s32);
void func_8025D3C4(ActorPart*, s32);
@ -799,8 +819,13 @@ void update_encounters_conversation(void);
void update_encounters_post_battle(void);
void reset_background_settings(void);
void func_80138188(void);
void func_80266970(Actor*);
void func_80266ADC(Actor*);
void func_80266AF8(Actor*);
void func_80266E14(ActorPart*);
void func_80268770(s32, s32, s32);
void func_80268C9C(void);
s32 check_block_input(s32 buttonMask);
void func_802B6CF0_E2B3A0(void);
void func_80269160(void);
void func_800E24F8(void);
@ -820,6 +845,7 @@ void draw_encounters_neutral(void);
void show_first_strike_message(void);
void entity_upgrade_block_hide_content(s32);
s32 lookup_defense(s32*, s32);
s32 lookup_status_chance(s32*, s32);
void peach_check_for_parasol_input(void);
void peach_sync_disguise_npc(void);
s32 check_conversation_trigger(void);

View File

@ -150,9 +150,9 @@ extern s32 D_800A0964;
extern s8 D_800A0B94;
extern s16 D_800A0BB8;
extern SpriteShadingProfile* D_801512B0;
extern SpriteShadingProfile* D_80151328;
extern Window gWindows[64];
extern s32 D_802A3838;

View File

@ -38,9 +38,6 @@ if [[ "$uname" == "Darwin" ]]; then
echo "Installing extra"
python3 -m pip install -U -r requirements_extra.txt || exit 1
fi
echo "Done"
exit
fi
# Debian and derivatives (apt)
@ -59,8 +56,6 @@ if cat /etc/os-release | grep -E 'ID=debian|ID_LIKE=(.*)debian' &> /dev/null; th
${SUDO} apt install -y clang-tidy astyle doxygen || exit 1
python3 -m pip install -U -r requirements_extra.txt || exit 1
fi
echo "Done"
fi
# Arch Linux and derivatives (pacman)
@ -101,8 +96,6 @@ if cat /etc/os-release | grep -E 'ID=arch|ID_LIKE=arch' &> /dev/null; then
${SUDO} pacman -S --noconfirm --needed clang astyle doxygen || exit 1
python3 -m pip install -U -r requirements_extra.txt || exit 1
fi
echo "Done"
fi
# openSUSE (zypper)
@ -137,8 +130,6 @@ if cat /etc/os-release | grep ID=opensuse &> /dev/null; then
${SUDO} zypper -n install clang astyle doxygen || exit 1
python3 -m pip install -U -r requirements_extra.txt || exit 1
fi
echo "Done"
fi
# Alpine Linux (apk)
@ -194,12 +185,10 @@ if cat /etc/os-release | grep ID=alpine &> /dev/null; then
${SUDO} apk add --no-cache clang-extra-tools astyle doxygen || exit 1
python3 -m pip install -U -r requirements_extra.txt || exit 1
fi
echo "Done"
fi
if [ "$supported" = false ]; then
if [ "$supported" != true ]; then
echo "The following distros (and their derivatives) are supported by install.sh:"
echo "- Debian/Ubuntu (apt)"
echo "- Arch Linux (pacman)"

View File

@ -5,7 +5,7 @@
s32 calc_item_check_hit(void) {
BattleStatus* battleStatus = &gBattleStatus;
ActorMovement* walk = &battleStatus->playerActor->state;
ActorState* state = &battleStatus->playerActor->state;
s32 actorID = battleStatus->currentTargetID;
s8 currentTargetPartS8;
u32 currentTargetPart;
@ -26,11 +26,11 @@ s32 calc_item_check_hit(void) {
return HIT_RESULT_MISS;
}
if (actor->stoneStatus == 0xC) {
sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
sfx_play_sound_at_position(0x10C, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_IMMUNE;
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (actorPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)) {
sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
sfx_play_sound_at_position(0xE9, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return HIT_RESULT_LANDED_ON_SPIKE;
}
} else {
@ -40,83 +40,83 @@ s32 calc_item_check_hit(void) {
return HIT_RESULT_HIT;
}
// Almost matching besides the parts that are marked as "TODO"
#ifdef NON_MATCHING
s32 calc_item_damage_enemy(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* playerActor = battleStatus->playerActor;
Actor* player = battleStatus->playerActor;
s32 currentTargetID = battleStatus->currentTargetID;
Actor* partnerActor = battleStatus->partnerActor;
Actor* partner = battleStatus->partnerActor;
s32 currentTargetPartID = battleStatus->currentTargetPart;
Actor* targetActor;
ActorPart* targetActorPart;
ActorState* actorState;
Evt* attackScript;
s32 sp1C = 0;
s32 isFireDamage = 0;
s32 isElectricDamage = 0;
s32 isIceDamage = 0;
s8 wasStatusInflicted = FALSE;
s32 currentHP;
s32 baseStatusChance;
s32 sp18;
s32 sp1C = FALSE;
s32 actorClass;
s32 isFireDamage = FALSE;
s32 isElectricDamage = FALSE;
s32 isIceDamage = FALSE;
Actor* target;
ActorPart* targetPart;
Evt* script;
s32 attackDamage;
s32 targetActorDefense;
s32 temp;
s32 targetDefense;
ActorState* state;
s32 dispatchEvent;
u32 sp18;
s32 phi_a0_2;
s32 phi_fp;
s32 wasStatusInflicted;
s32 ret;
battleStatus->wasStatusInflicted = FALSE;
battleStatus->lastAttackDamage = 0;
battleStatus->attackerActorID = playerActor->actorID;
battleStatus->attackerActorID = player->actorID;
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
target = get_actor(currentTargetID);
wasStatusInflicted = FALSE;
targetActor = get_actor(currentTargetID);
if (targetActor == NULL) {
if (target == NULL) {
return 0;
}
targetActorPart = get_actor_part(targetActor, currentTargetPartID);
currentTargetID &= ACTOR_CLASS_MASK;
if (targetActorPart == NULL) {
targetPart = get_actor_part(target, currentTargetPartID);
if (targetPart == NULL) {
PANIC();
}
targetActor->lastDamageTaken = 0;
if (gBattleStatus.flags1 & BS_FLAGS1_80000) {
actorState = &playerActor->state;
target->lastDamageTaken = 0;
actorClass = currentTargetID & ACTOR_CLASS_MASK;
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
state = &player->state;
} else {
actorState = &partnerActor->state;
state = &partner->state;
}
phi_a0_2 = 0;
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
fx_ring_blast(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f, 1.0f, 0x18);
fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
isFireDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ELECTRIC) {
func_80251474(targetActor);
func_80251474(target);
isElectricDamage = TRUE;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
fx_water_splash(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f, 1.0f, 0x18);
fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 0x18);
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
fx_big_snowflakes(0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z + 5.0f);
fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
isIceDamage = TRUE;
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) == 0) {
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) {
return 6;
}
if (targetActor->transStatus == STATUS_E || targetActorPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) {
if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) ||
((target->transStatus == STATUS_E) || ((targetPart->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))))
{
return 6;
}
}
if (targetActor->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 1);
show_damage_popup(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 0);
if (target->stoneStatus == STATUS_STONE) {
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
return 1;
@ -124,62 +124,74 @@ s32 calc_item_damage_enemy(void) {
return 0;
}
}
sp18 = (targetActorPart->partFlags3 & battleStatus->currentAttackElement) != 0; // TODO 3a8
if (targetActorPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_80000)) {
if (targetPart->partFlags3 & battleStatus->currentAttackElement) {
sp18 = TRUE;
} else {
sp18 = FALSE;
}
if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_ENCHANTED | ACTOR_EVENT_FLAG_80000)) {
battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
}
targetActorDefense = get_defense(targetActor, targetActorPart->defenseTable, battleStatus->currentAttackElement);
temp = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
targetActorDefense += targetActor->defenseBoost;
temp += target->defenseBoost;
}
attackDamage = battleStatus->currentAttackDamage;
if (attackDamage > 99) {
attackDamage = 99;
}
if (attackDamage <= 0) {
targetActorDefense = 0;
temp = 0;
}
attackDamage -= targetActorDefense;
targetActor->hpChangeCounter = 0;
if (attackDamage <= 0) { // TODO 434
targetActor->hpChangeCounter = 0;
attackDamage -= temp;
target->hpChangeCounter = 0;
if (attackDamage <= 0) {
target->hpChangeCounter = 0;
ret = 2;
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
phi_fp = 2;
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
battleStatus->lastAttackDamage = 0;
} else {
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
battleStatus->lastAttackDamage = 0;
}
} else {
targetActor->damageCounter += attackDamage;
targetActor->hpChangeCounter -= attackDamage;
target->damageCounter += attackDamage;
target->hpChangeCounter -= attackDamage;
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_HIT_COMBO;
phi_fp = 0;
if (!(targetActorPart->flags & ACTOR_PART_FLAG_2000) && sp18 == 0 && !(targetActorPart->targetFlags & ACTOR_PART_FLAG_4)) {
targetActor->currentHP -= attackDamage;
if (targetActor->currentHP <= 0) {
targetActor->currentHP = 0;
ret = 0;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000) && !sp18 && !(targetPart->targetFlags & ACTOR_PART_FLAG_4)) {
target->currentHP -= attackDamage;
if (target->currentHP <= 0) {
target->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
}
battleStatus->lastAttackDamage += attackDamage;
targetActor->lastDamageTaken = battleStatus->lastAttackDamage;
targetActor->hpChangeCounter = 0;
target->lastDamageTaken = battleStatus->lastAttackDamage;
target->hpChangeCounter = 0;
}
if (targetActorPart->flags & ACTOR_PART_FLAG_2000) {
dispatch_event_actor(targetActor, dispatchEvent);
func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 3);
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
if (targetPart->flags & ACTOR_PART_FLAG_2000) {
dispatch_event_actor(target, dispatchEvent);
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
return 2;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_2000) {
battleStatus->lastAttackDamage = 0;
dispatchEvent = EVENT_DEATH;
phi_fp = 0;
ret = 0;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
@ -187,302 +199,330 @@ s32 calc_item_damage_enemy(void) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
dispatchEvent = EVENT_IMMUNE;
}
if (targetActor->currentHP <= 0) {
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
if (target->currentHP <= 0 && dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_DEATH;
}
} else if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) {
goto block_80;
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
dispatchEvent = EVENT_IMMUNE;
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_400000) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
dispatchEvent = EVENT_1D;
}
ret = 0;
}
dispatchEvent = EVENT_IMMUNE;
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_400000) {
dispatchEvent = EVENT_STAR_BEAM;
wasStatusInflicted = TRUE;
}
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
dispatchEvent = EVENT_1D;
}
phi_fp = 0;
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS
&& gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& targetActor->attackBoost <= 0
&& targetActor->defenseBoost <= 0
&& targetActor->staticStatus == STATUS_END
&& targetActor->transStatus == STATUS_END) {
targetActor->attackBoost = 0;
targetActor->defenseBoost = 0;
targetActor->isGlowing = FALSE;
dispatchEvent = EVENT_HIT; // TODO 660
if (targetActor->staticStatus != STATUS_END) {
targetActor->staticStatus = STATUS_END;
targetActor->staticDuration = 0;
remove_status_static(targetActor->hudElementDataIndex);
if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) {
if (gBattleStatus.flags1 & 0x20) {
if ((target->attackBoost > 0 || target->defenseBoost > 0) ||
((target->staticStatus == 0 && target->transStatus != 0) || target->staticStatus != 0))
{
target->attackBoost = 0;
target->defenseBoost = 0;
target->isGlowing = FALSE;
dispatchEvent = EVENT_HIT;
if (target->staticStatus != 0) {
target->staticStatus = 0;
target->staticDuration = 0;
remove_status_static(target->hudElementDataIndex);
}
if (target->transStatus != 0) {
target->transStatus = 0;
target->transDuration = 0;
remove_status_transparent(target->hudElementDataIndex);
}
wasStatusInflicted = TRUE;
ret = 0;
}
}
if (targetActor->transStatus != STATUS_END) {
targetActor->transStatus = STATUS_END;
targetActor->transDuration = 0;
remove_status_transparent(targetActor->hudElementDataIndex);
}
wasStatusInflicted = TRUE;
phi_fp = 0;
}
block_80:
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_PEACH_BEAM) {
dispatchEvent = EVENT_IMMUNE;
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ENCHANTED) {
dispatchEvent = EVENT_14;
wasStatusInflicted = TRUE;
}
if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
if (targetPart->eventFlags & ACTOR_EVENT_FLAG_80000) {
dispatchEvent = EVENT_14;
wasStatusInflicted = TRUE;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_SPIN_SMASH_DEATH;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW) && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_POW && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_800000) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE) && targetActorPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_BURN_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_BURN_DEATH;
}
isFireDamage = 1;
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
&& battleStatus->lastAttackDamage >= 0
&& dispatchEvent != EVENT_DEATH
&& dispatchEvent != EVENT_SPIN_SMASH_DEATH
&& dispatchEvent != EVENT_EXPLODE_TRIGGER) {
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(targetActor, STATUS_SHRINK, STATUS_SHRINK_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && try_inflict_status(targetActor, STATUS_POISON, STATUS_POISON_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STONE && try_inflict_status(targetActor, STATUS_STONE, STATUS_STONE_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && try_inflict_status(targetActor, STATUS_SLEEP, STATUS_SLEEP_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && try_inflict_status(targetActor, STATUS_STOP, STATUS_STOP_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STATIC && try_inflict_status(targetActor, STATUS_STATIC, STATUS_STATIC_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FEAR && try_inflict_status(targetActor, STATUS_FEAR, STATUS_FEAR_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && try_inflict_status(targetActor, STATUS_PARALYZE, STATUS_PARALYZE_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && try_inflict_status(targetActor, STATUS_DIZZY, STATUS_DIZZY_TURN_MOD)) {
wasStatusInflicted = TRUE;
}
if (wasStatusInflicted != FALSE) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_HIT;
}
}
}
}
}
}
}
}
}
baseStatusChance = (battleStatus->statusChance * targetActor->actorBlueprint->baseStatusChance) / 100; // TODO a70
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR) {
//dispatchEvent = EVENT_IMMUNE;
if (rand_int(99) < baseStatusChance) {
dispatchEvent = EVENT_IMMUNE;
phi_fp = 2;
if (targetActor->debuff - 3 >= 6) {
phi_fp = 2;
if (!(targetActor->flags & ACTOR_FLAG_400)) {
sp1C = 1;
gBattleStatus.flags1 |= (BS_FLAGS1_1 | BS_FLAGS1_8 | BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE | BS_FLAGS1_40);
sfx_play_sound_at_position(SOUND_UNKNOWN_231, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
wasStatusInflicted = TRUE;
dispatchEvent = EVENT_SCARE_AWAY;
phi_fp = 0;
}
}
} else {
phi_fp = 2;
}
}
battleStatus->wasStatusInflicted = wasStatusInflicted; // TODO b8c
if (sp1C != 0 && (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200) || gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200) && gBattleStatus.flags1 & BS_FLAGS1_80 && battleStatus->lastAttackDamage > 0) && (sfx_play_sound_at_position(0x231, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z), battleStatus->lastAttackDamage > 0) || battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && sp1C != 0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_40)) {
phi_a0_2 = 3;
}
func_802667F0(phi_a0_2, targetActor, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(targetActor);
}
dispatch_event_actor(targetActor, dispatchEvent);
if (currentTargetID == 0x100) {
if (battleStatus->lastAttackDamage > 0 && gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
inflict_status(targetActor, 13, battleStatus->lastAttackDamage);
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_SPIN_SMASH_DEATH;
}
}
}
if (!(targetActor->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW)) &&
(targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE))
{
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_POW) &&
(targetPart->eventFlags & ACTOR_EVENT_FLAG_800000))
{
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FALL_TRIGGER;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE)) &&
(targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE))
{
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_FLIP_TRIGGER;
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
if (dispatchEvent == EVENT_HIT) {
dispatchEvent = EVENT_BURN_HIT;
}
if (dispatchEvent == EVENT_DEATH) {
dispatchEvent = EVENT_BURN_DEATH;
}
isFireDamage = TRUE;
}
}
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) &&
battleStatus->lastAttackDamage >= 0 &&
dispatchEvent != EVENT_DEATH &&
dispatchEvent != EVENT_SPIN_SMASH_DEATH &&
dispatchEvent != EVENT_EXPLODE_TRIGGER)
{
// Using this macro because it's nicer to look at, and it also is necessary to wrap the first 5 of these in a
// do-while-0 OR to wrap each one individually. It's more likely that it's a macro instead, and much cleaner
#define INFLICT_STATUS(STATUS_TYPE) \
do { \
if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
try_inflict_status(target, STATUS_##STATUS_TYPE, STATUS_##STATUS_TYPE##_TURN_MOD)) { \
wasStatusInflicted = TRUE; \
} \
} while (0);
INFLICT_STATUS(SHRINK);
INFLICT_STATUS(POISON);
INFLICT_STATUS(STONE);
INFLICT_STATUS(SLEEP);
INFLICT_STATUS(STOP);
INFLICT_STATUS(STATIC);
INFLICT_STATUS(FEAR);
INFLICT_STATUS(PARALYZE);
INFLICT_STATUS(DIZZY);
#undef INFLICT_STATUS
if (wasStatusInflicted) {
if (dispatchEvent == EVENT_UNKNOWN_TRIGGER) {
dispatchEvent = EVENT_HIT_COMBO;
}
if (dispatchEvent == EVENT_IMMUNE) {
dispatchEvent = EVENT_HIT;
}
}
}
temp = target->actorBlueprint->baseStatusChance;
temp = (battleStatus->statusChance * temp) / 100;
if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) && (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR)) {
if (rand_int(99) < temp &&
!(target->debuff == STATUS_FEAR ||
target->debuff == STATUS_DIZZY ||
target->debuff == STATUS_PARALYZE ||
target->debuff == STATUS_SLEEP ||
target->debuff == STATUS_FROZEN ||
target->debuff == STATUS_STOP) &&
!(target->flags & ACTOR_FLAG_400))
{
dispatchEvent = EVENT_SCARE_AWAY;
ret = 0;
sp1C = TRUE;
gBattleStatus.flags1 |= 0x39;
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
wasStatusInflicted = TRUE;
gBattleStatus.flags1 |= 0x40;
} else {
dispatchEvent = EVENT_IMMUNE;
ret = 2;
}
}
battleStatus->wasStatusInflicted = wasStatusInflicted;
if (
(sp1C && (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200))) ||
((gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) && !(gBattleStatus.flags1 & BS_FLAGS1_80))
) {
if (battleStatus->lastAttackDamage > 0) {
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (battleStatus->lastAttackDamage > 0 || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && sp1C) {
if (gBattleStatus.flags1 & BS_FLAGS1_40) {
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
func_802667F0(3, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
func_80266970(target);
}
dispatch_event_actor(target, dispatchEvent);
if (actorClass == ACTOR_PARTNER) {
if ((battleStatus->lastAttackDamage > 0) && (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
inflict_status(target, STATUS_DAZE, battleStatus->lastAttackDamage);
}
}
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
if (battleStatus->lastAttackDamage == 0) {
if (sp1C == 0 && !wasStatusInflicted) {
func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 3);
if (!sp1C && !wasStatusInflicted) {
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
}
} else if (sp18 == 0) {
} else if (!sp18) {
if (battleStatus->currentAttackElement & (DAMAGE_TYPE_SMASH | DAMAGE_TYPE_NO_OTHER_DAMAGE_POPUPS)) {
show_damage_popup(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage, 0);
show_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
} else {
func_802664DC(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage, 0);
func_802664DC(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
}
if (!(targetActorPart->targetFlags & 4)) {
func_802666E4(targetActor, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, battleStatus->lastAttackDamage);
if (!(targetPart->targetFlags & 4)) {
func_802666E4(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
}
}
if (battleStatus->lastAttackDamage > 0) {
if (sp18 == 0) {
func_80267018(targetActor, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
} else if (isElectricDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
}
}
if (battleStatus->lastAttackDamage <= 0 && wasStatusInflicted && targetActorPart->flags & ACTOR_FLAG_2000) {
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
attackScript = start_script(DoSleepHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
attackScript = start_script(DoDizzyHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
attackScript = start_script(DoParalyzeHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
attackScript = start_script(DoPoisonHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
attackScript = start_script(DoStopHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
attackScript = start_script(DoFreezeHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
attackScript->varTable[3] = targetActor;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
attackScript = start_script(DoShrinkHit, 10, 0);
attackScript->varTable[0] = actorState->goalPos.x;
attackScript->varTable[1] = actorState->goalPos.y;
attackScript->varTable[2] = actorState->goalPos.z;
attackScript->varTable[3] = targetActor;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
if (battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH && targetActor->actorType == 0x93) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
}
func_80266ADC(targetActor);
if (battleStatus->lastAttackDamage > 0 && !sp18) {
func_80267018(target, 1);
if (isFireDamage) {
sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isElectricDamage) {
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else if (isIceDamage) {
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
if ((battleStatus->lastAttackDamage <= 0 && !wasStatusInflicted) || (targetPart->flags & ACTOR_FLAG_2000)) {
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && wasStatusInflicted) {
script = start_script(DoSleepHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY) && wasStatusInflicted) {
script = start_script(DoDizzyHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE) && wasStatusInflicted) {
script = start_script(DoParalyzeHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_POISON) && wasStatusInflicted) {
script = start_script(DoPoisonHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_STOP) && wasStatusInflicted) {
script = start_script(DoStopHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN) && wasStatusInflicted) {
script = start_script(DoFreezeHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTable[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && wasStatusInflicted) {
script = start_script(DoShrinkHit, 0xA, 0);
script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z;
script->varTable[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if ((battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH) && (target->actorType == ACTOR_TYPE_GOOMNUT_TREE)) {
sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
func_80266ADC(target);
if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
if (phi_fp == 0) {
phi_fp = 1;
if (ret == 0) {
ret = 1;
}
if (phi_fp == 2) {
phi_fp = 3;
if (ret == 2) {
ret = 3;
}
}
return phi_fp;
return ret;
}
#else
INCLUDE_ASM(s32, "17FEB0", calc_item_damage_enemy);
#endif
ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,9 @@
#include "sprite.h"
typedef struct PartnerDMAData {
/* 0x00 */ s32 dmaStart;
/* 0x04 */ s32 dmaEnd;
/* 0x08 */ s32 dmaDest;
/* 0x00 */ u32 dmaStart;
/* 0x04 */ u32 dmaEnd;
/* 0x08 */ void* dmaDest;
/* 0x0C */ ActorBlueprint* ActorBlueprint;
/* 0x10 */ s32 y;
} PartnerDMAData; // size = 0x14
@ -1197,8 +1197,8 @@ s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) {
return ret;
}
void func_80263230(Actor* arg0, Actor* arg1) {
func_80263064(arg0, arg1, 0);
s32 func_80263230(Actor* arg0, Actor* arg1) {
return func_80263064(arg0, arg1, 0);
}
void func_8026324C(Actor* arg0, Actor* arg1) {
@ -2857,7 +2857,7 @@ s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == STATUS_DAZE) {
if (statusTypeKey != target->koStatus) {
inflict_status(target, STATUS_DAZE, duration);
sfx_play_sound(0x2107);
sfx_play_sound(SOUND_2107);
} else {
target->koDuration += duration;
if (target->koDuration > 9) {
@ -3127,8 +3127,7 @@ void func_80266B14(void) {
}
}
// dumb label
#ifdef NON_MATCHING
// TODO dumb label required to match, clean up
s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) {
BattleStatus* battleStatus = &gBattleStatus;
s32 phi_s0;
@ -3163,7 +3162,6 @@ s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) {
duration = 3;
}
// TODO remove this label (required to match)
meow:
if (duration > 0) {
if (battleStatus->currentAttackStatus < 0) {
@ -3179,12 +3177,9 @@ meow:
}
return duration;
}
#else
INCLUDE_ASM(s32, "190B20", try_inflict_status);
#endif
s32 inflict_status_set_duration(Actor* actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration) {
s32 var0 = duration;
s32 var0 = duration; // TODO required to match, look into
s32 statusDuration = 0;
if (actor->statusTable == NULL || lookup_status_chance(actor->statusTable, statusTypeKey) > 0) {
@ -3690,7 +3685,7 @@ void start_rumble_type(u32 arg0) {
case 9:
case 10:
case 11:
D_802939C0 = start_script(D_80293AC4, 0xA, 0x20)->id;
D_802939C0 = start_script(&D_80293AC4, 0xA, 0x20)->id;
break;
}
}

View File

@ -3,13 +3,10 @@
#include "script_api/battle.h"
#include "effects.h"
#include "hud_element.h"
#include "sprite.h"
s32 D_802946E0[] = { 100, 100, 100, 110, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130 };
s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event);
s32 func_80263230(Actor*, Actor*);
void func_80267018(Actor* actor, s32 arg1);
s32 has_enchanted_part(Actor* actor) {
ActorPart* partIt = actor->partsTable;
s32 ret = FALSE;
@ -820,7 +817,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven
if (actor->currentHP <= 0) {
battleStatus->lastAttackDamage += actor->currentHP;
actor->currentHP = 0;
dispatchEvent = EVENT_DEATH;
dispatchEvent = EVENT_DEATH;
}
battleStatus->lastAttackDamage += temp_v1;
@ -870,6 +867,7 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven
return 0;
}
#else
s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEvent, s32 stopMotion);
INCLUDE_ASM(s32, "1A5830", dispatch_damage_event_actor);
#endif
@ -1095,11 +1093,11 @@ s32 LandJumpPart(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1;
}
part = script->functionTemp[2];
part = (ActorPart*)script->functionTemp[2];
movement = part->movement;
movement->unk_00.y += movement->unk_2C;
movement->unk_2C -= movement->jumpScale;
add_xz_vec3f_copy1(movement, movement->moveSpeed, movement->unk_30);
add_xz_vec3f_copy1(&movement->unk_00, movement->moveSpeed, movement->unk_30);
part->absolutePosition.x = movement->unk_00.x;
part->absolutePosition.y = movement->unk_00.y;
part->absolutePosition.z = movement->unk_00.z;

View File

@ -1122,7 +1122,7 @@ INCLUDE_ASM(s32, "80850_len_3060", is_ability_active);
#endif
s32 is_partner_ability_active(void) {
s32 is_partner_ability_active(s32 ability) {
return 0;
}

View File

@ -75,7 +75,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80220C14)),
.partsData = N(partsTable_80220C14),
.script = N(init_80220CAC),
.script = &N(init_80220CAC),
.statusTable = N(statusTable_80220B68),
.escapeChance = 70,
.airLiftChance = 30,

View File

@ -144,7 +144,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021B460)),
.partsData = N(partsTable_8021B460),
.script = N(init_8021B564),
.script = &N(init_8021B564),
.statusTable = N(statusTable_8021B3B4),
.escapeChance = 50,
.airLiftChance = 95,

View File

@ -66,7 +66,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_80218828)),
.partsData = N(partsTable_80218828),
.script = N(init_802188C0),
.script = &N(init_802188C0),
.statusTable = N(statusTable_8021877C),
.escapeChance = 60,
.airLiftChance = 90,

View File

@ -81,7 +81,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_80225D4C)),
.partsData = N(partsTable_80225D4C),
.script = N(init_80225D98),
.script = &N(init_80225D98),
.statusTable = N(statusTable_80225CA0),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -111,7 +111,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 50,
.partCount = ARRAY_COUNT(N(partsTable_80223D30)),
.partsData = N(partsTable_80223D30),
.script = N(init_80223DA0),
.script = &N(init_80223DA0),
.statusTable = N(statusTable_80223C84),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -76,7 +76,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_80218104)),
.partsData = N(partsTable_80218104),
.script = N(init_80218150),
.script = &N(init_80218150),
.statusTable = N(statusTable_80218058),
.escapeChance = 60,
.airLiftChance = 60,

View File

@ -82,7 +82,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_80218D24)),
.partsData = N(partsTable_80218D24),
.script = N(init_80218D70),
.script = &N(init_80218D70),
.statusTable = N(statusTable_80218C78),
.escapeChance = 15,
.airLiftChance = 0,

View File

@ -118,7 +118,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_8021AD80)),
.partsData = N(partsTable_8021AD80),
.script = N(init_8021AEB4),
.script = &N(init_8021AEB4),
.statusTable = N(statusTable_8021ACD4),
.escapeChance = 60,
.airLiftChance = 80,

View File

@ -73,7 +73,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80219114)),
.partsData = N(partsTable_80219114),
.script = N(init_80219160),
.script = &N(init_80219160),
.statusTable = N(statusTable_80219068),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -136,7 +136,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8021D5F0)),
.partsData = N(partsTable_8021D5F0),
.script = N(init_8021E100),
.script = &N(init_8021E100),
.statusTable = N(statusTable_8021D498),
.escapeChance = 0,
.airLiftChance = 0,
@ -161,7 +161,7 @@ ActorBlueprint N(flying) = {
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8021D614)),
.partsData = N(partsTable_8021D614),
.script = N(init_8021E2C0),
.script = &N(init_8021E2C0),
.statusTable = N(statusTable_8021D544),
.escapeChance = 0,
.airLiftChance = 0,
@ -1304,7 +1304,7 @@ ActorBlueprint N(clone) = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80221624)),
.partsData = N(partsTable_80221624),
.script = N(init_8022143C),
.script = &N(init_8022143C),
.statusTable = N(statusTable_802214CC),
.escapeChance = 40,
.airLiftChance = 0,
@ -1327,7 +1327,7 @@ ActorBlueprint N(flying_clone) = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80221648)),
.partsData = N(partsTable_80221648),
.script = N(init_80221478),
.script = &N(init_80221478),
.statusTable = N(statusTable_80221578),
.escapeChance = 40,
.airLiftChance = 0,

View File

@ -74,7 +74,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021E594)),
.partsData = N(partsTable_8021E594),
.script = N(init_8021E6BC),
.script = &N(init_8021E6BC),
.statusTable = N(statusTable_8021E4E8),
.escapeChance = 60,
.airLiftChance = 75,

View File

@ -131,7 +131,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80218CC8)),
.partsData = N(partsTable_80218CC8),
.script = N(init_80218EC4),
.script = &N(init_80218EC4),
.statusTable = N(statusTable_80218C1C),
.escapeChance = 60,
.airLiftChance = 90,

View File

@ -221,7 +221,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80221604)),
.partsData = N(partsTable_80221604),
.script = N(init_80221ABC),
.script = &N(init_80221ABC),
.statusTable = N(statusTable_80221558),
.escapeChance = 0,
.airLiftChance = 25,

View File

@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_8021C568)),
.partsData = N(partsTable_8021C568),
.script = N(init_8021C64C),
.script = &N(init_8021C64C),
.statusTable = N(statusTable_8021C4BC),
.escapeChance = 50,
.airLiftChance = 100,

View File

@ -232,7 +232,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80218D34)),
.partsData = N(partsTable_80218D34),
.script = N(init_80218EC4),
.script = &N(init_80218EC4),
.statusTable = N(statusTable_80218C88),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -204,7 +204,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 30,
.partCount = ARRAY_COUNT(N(partsTable_8021BAD4)),
.partsData = N(partsTable_8021BAD4),
.script = N(init_8021BC1C),
.script = &N(init_8021BC1C),
.statusTable = N(statusTable_8021BA28),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -141,7 +141,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 40,
.partCount = ARRAY_COUNT(N(partsTable_8021B708)),
.partsData = N(partsTable_8021B708),
.script = N(init_8021B7E4),
.script = &N(init_8021B7E4),
.statusTable = N(statusTable_8021B65C),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -72,7 +72,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_802187EC)),
.partsData = N(partsTable_802187EC),
.script = N(init_802188D0),
.script = &N(init_802188D0),
.statusTable = N(statusTable_80218740),
.escapeChance = 80,
.airLiftChance = 40,

View File

@ -88,7 +88,7 @@ ActorBlueprint N(1) = {
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021A508)),
.partsData = N(partsTable_8021A508),
.script = N(init_8021A7B0),
.script = &N(init_8021A7B0),
.statusTable = N(statusTable_8021A45C),
.escapeChance = 80,
.airLiftChance = 70,
@ -162,7 +162,7 @@ ActorBlueprint N(2) = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8021A60C)),
.partsData = N(partsTable_8021A60C),
.script = N(init_8021A630),
.script = &N(init_8021A630),
.statusTable = NULL,
.escapeChance = 80,
.airLiftChance = 0,

View File

@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_8021FD54)),
.partsData = N(partsTable_8021FD54),
.script = N(init_8021FDA0),
.script = &N(init_8021FDA0),
.statusTable = N(statusTable_8021FCA8),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -114,7 +114,7 @@ ActorBlueprint N(whacka) = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80220A04)),
.partsData = N(partsTable_80220A04),
.script = N(init_80220A50),
.script = &N(init_80220A50),
.statusTable = N(statusTable_80220958),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -109,7 +109,7 @@ ActorBlueprint N(whacka) = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80221720)),
.partsData = N(partsTable_80221720),
.script = N(init_8022176C),
.script = &N(init_8022176C),
.statusTable = N(statusTable_80221674),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8021DA4C)),
.partsData = N(partsTable_8021DA4C),
.script = N(init_8021DA98),
.script = &N(init_8021DA98),
.statusTable = N(statusTable_8021D9A0),
.escapeChance = 70,
.airLiftChance = 20,

View File

@ -67,7 +67,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021EA90)),
.partsData = N(partsTable_8021EA90),
.script = N(init_8021EB28),
.script = &N(init_8021EB28),
.statusTable = N(statusTable_8021E9E4),
.escapeChance = 30,
.airLiftChance = 85,

View File

@ -76,7 +76,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 8,
.partCount = ARRAY_COUNT(N(partsTable_8022193C)),
.partsData = N(partsTable_8022193C),
.script = N(init_80221988),
.script = &N(init_80221988),
.statusTable = N(statusTable_80221890),
.escapeChance = 70,
.airLiftChance = 85,

View File

@ -178,7 +178,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_802187F0)),
.partsData = N(partsTable_802187F0),
.script = N(init_80218980),
.script = &N(init_80218980),
.statusTable = N(statusTable_80218698),
.escapeChance = 50,
.airLiftChance = 85,

View File

@ -106,7 +106,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80218B00)),
.partsData = N(partsTable_80218B00),
.script = N(init_80218B70),
.script = &N(init_80218B70),
.statusTable = N(statusTable_80218A54),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 6,
.partCount = ARRAY_COUNT(N(partsTable_80219968)),
.partsData = N(partsTable_80219968),
.script = N(init_8021B268),
.script = &N(init_8021B268),
.statusTable = N(statusTable_802198BC),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 6,
.partCount = ARRAY_COUNT(N(partsTable_8021D4B8)),
.partsData = N(partsTable_8021D4B8),
.script = N(init_8021EDB8),
.script = &N(init_8021EDB8),
.statusTable = N(statusTable_8021D40C),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -128,7 +128,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_802209C8)),
.partsData = N(partsTable_802209C8),
.script = N(init_80220A38),
.script = &N(init_80220A38),
.statusTable = N(statusTable_8022091C),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -118,7 +118,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 255,
.partCount = ARRAY_COUNT(N(partsTable_8022339C)),
.partsData = N(partsTable_8022339C),
.script = N(init_80223488),
.script = &N(init_80223488),
.statusTable = N(statusTable_802232F0),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021B778)),
.partsData = N(partsTable_8021B778),
.script = N(init_8021D078),
.script = &N(init_8021D078),
.statusTable = N(statusTable_8021B6CC),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021EEB8)),
.partsData = N(partsTable_8021EEB8),
.script = N(init_802207B8),
.script = &N(init_802207B8),
.statusTable = N(statusTable_8021EE0C),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -88,7 +88,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 15,
.partCount = ARRAY_COUNT(N(partsTable_802244C4)),
.partsData = N(partsTable_802244C4),
.script = N(init_80224A94),
.script = &N(init_80224A94),
.statusTable = N(statusTable_80224418),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -184,7 +184,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 60,
.partCount = ARRAY_COUNT(N(partsTable_8022C640)),
.partsData = N(partsTable_8022C640),
.script = N(init_8022CF80),
.script = &N(init_8022CF80),
.statusTable = N(statusTable_8022C43C),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_80222AE4)),
.partsData = N(partsTable_80222AE4),
.script = N(init_80223180),
.script = &N(init_80223180),
.statusTable = N(statusTable_80222A38),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -115,7 +115,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 50,
.partCount = ARRAY_COUNT(N(partsTable_8022A6E0)),
.partsData = N(partsTable_8022A6E0),
.script = N(init_8022ACE4),
.script = &N(init_8022ACE4),
.statusTable = N(statusTable_8022A634),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -101,7 +101,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 40,
.partCount = ARRAY_COUNT(N(partsTable_80225F0C)),
.partsData = N(partsTable_80225F0C),
.script = N(init_80226510),
.script = &N(init_80226510),
.statusTable = N(statusTable_80225E60),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -133,7 +133,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable)),
.partsData = N(partsTable),
.script = N(init_8021F450),
.script = &N(init_8021F450),
.statusTable = N(statusTable_8021C274),
.escapeChance = 90,
.airLiftChance = 100,

View File

@ -63,7 +63,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_8021A448)),
.partsData = N(partsTable_8021A448),
.script = N(init_8021BEBC),
.script = &N(init_8021BEBC),
.statusTable = N(statusTable_8021A39C),
.escapeChance = 90,
.airLiftChance = 95,

View File

@ -95,7 +95,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 40,
.partCount = ARRAY_COUNT(N(partsTable_80228014)),
.partsData = N(partsTable_80228014),
.script = N(init_80228618),
.script = &N(init_80228618),
.statusTable = N(statusTable_80227F68),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -121,7 +121,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 9,
.partCount = ARRAY_COUNT(N(partsTable_80218EE8)),
.partsData = N(partsTable_80218EE8),
.script = N(init_8021901C),
.script = &N(init_8021901C),
.statusTable = N(statusTable_80218E3C),
.escapeChance = 50,
.airLiftChance = 90,

View File

@ -138,7 +138,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80220FD0)),
.partsData = N(partsTable_80220FD0),
.script = N(init_80223298),
.script = &N(init_80223298),
.statusTable = N(statusTable_80220E78),
.escapeChance = 40,
.airLiftChance = 80,
@ -161,7 +161,7 @@ ActorBlueprint N(flying) = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80220FF4)),
.partsData = N(partsTable_80220FF4),
.script = N(init_8022333C),
.script = &N(init_8022333C),
.statusTable = N(statusTable_80220F24),
.escapeChance = 40,
.airLiftChance = 95,

View File

@ -68,7 +68,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 15,
.partCount = ARRAY_COUNT(N(partsTable_80219E24)),
.partsData = N(partsTable_80219E24),
.script = N(init_8021CCDC),
.script = &N(init_8021CCDC),
.statusTable = N(statusTable_80219D78),
.escapeChance = 100,
.airLiftChance = 0,

View File

@ -90,7 +90,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_8021D47C)),
.partsData = N(partsTable_8021D47C),
.script = N(init_8021D4C8),
.script = &N(init_8021D4C8),
.statusTable = N(statusTable_8021D3D0),
.escapeChance = 100,
.airLiftChance = 0,
@ -519,7 +519,7 @@ ActorBlueprint N(goombario) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_8021EA50)),
.partsData = N(partsTable_8021EA50),
.script = N(init_Goombario),
.script = &N(init_Goombario),
.statusTable = N(statusTable_8021E9A4),
.escapeChance = 100,
.airLiftChance = 0,
@ -1097,7 +1097,7 @@ ActorBlueprint N(kooper) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_8022069C)),
.partsData = N(partsTable_8022069C),
.script = N(init_Kooper),
.script = &N(init_Kooper),
.statusTable = N(statusTable_802205F0),
.escapeChance = 100,
.airLiftChance = 0,
@ -1609,7 +1609,7 @@ ActorBlueprint N(bombette) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80222394)),
.partsData = N(partsTable_80222394),
.script = N(init_LeeBombette),
.script = &N(init_LeeBombette),
.statusTable = N(statusTable_802222E8),
.escapeChance = 100,
.airLiftChance = 0,
@ -1975,7 +1975,7 @@ ActorBlueprint N(parakerry) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_8022348C)),
.partsData = N(partsTable_8022348C),
.script = N(init_Parakarry),
.script = &N(init_Parakarry),
.statusTable = N(statusTable_802233E0),
.escapeChance = 100,
.airLiftChance = 0,
@ -2337,7 +2337,7 @@ ActorBlueprint N(bow) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80224514)),
.partsData = N(partsTable_80224514),
.script = N(init_Bow),
.script = &N(init_Bow),
.statusTable = N(statusTable_80224468),
.escapeChance = 100,
.airLiftChance = 0,
@ -2789,7 +2789,7 @@ ActorBlueprint N(watt) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80225A80)),
.partsData = N(partsTable_80225A80),
.script = N(init_Watt),
.script = &N(init_Watt),
.statusTable = N(statusTable_802259D4),
.escapeChance = 100,
.airLiftChance = 0,
@ -3173,7 +3173,7 @@ ActorBlueprint N(sushie) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_80226A80)),
.partsData = N(partsTable_80226A80),
.script = N(init_Sushie),
.script = &N(init_Sushie),
.statusTable = N(statusTable_802269D4),
.escapeChance = 100,
.airLiftChance = 0,
@ -3665,7 +3665,7 @@ ActorBlueprint N(lakilester) = {
.maxHP = 20,
.partCount = ARRAY_COUNT(N(partsTable_8022851C)),
.partsData = N(partsTable_8022851C),
.script = N(init_Lakilester),
.script = &N(init_Lakilester),
.statusTable = N(statusTable_80228470),
.escapeChance = 100,
.airLiftChance = 0,

View File

@ -73,7 +73,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 50,
.partCount = ARRAY_COUNT(N(partsTable_8022A364)),
.partsData = N(partsTable_8022A364),
.script = N(init_8022A3B0),
.script = &N(init_8022A3B0),
.statusTable = N(statusTable_8022A2B8),
.escapeChance = 100,
.airLiftChance = 0,

View File

@ -86,7 +86,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 75,
.partCount = ARRAY_COUNT(N(partsTable_8022B790)),
.partsData = N(partsTable_8022B790),
.script = N(init_8022B7DC),
.script = &N(init_8022B7DC),
.statusTable = N(statusTable_8022B6E4),
.escapeChance = 100,
.airLiftChance = 0,

View File

@ -98,7 +98,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_8022DAF0)),
.partsData = N(partsTable_8022DAF0),
.script = N(init_8022DB60),
.script = &N(init_8022DB60),
.statusTable = N(statusTable_8022DA44),
.escapeChance = 100,
.airLiftChance = 0,

View File

@ -141,7 +141,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021A924)),
.partsData = N(partsTable_8021A924),
.script = N(init_8021AA24),
.script = &N(init_8021AA24),
.statusTable = N(statusTable_8021A878),
.escapeChance = 40,
.airLiftChance = 95,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 6,
.partCount = ARRAY_COUNT(N(partsTable_80218478)),
.partsData = N(partsTable_80218478),
.script = N(init_80218510),
.script = &N(init_80218510),
.statusTable = N(statusTable_802183CC),
.escapeChance = 40,
.airLiftChance = 90,

View File

@ -86,7 +86,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8021D44C)),
.partsData = N(partsTable_8021D44C),
.script = N(init_8021D498),
.script = &N(init_8021D498),
.statusTable = N(statusTable_8021D3A0),
.escapeChance = 70,
.airLiftChance = 20,

View File

@ -61,7 +61,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_80222108)),
.partsData = N(partsTable_80222108),
.script = N(init_802221A0),
.script = &N(init_802221A0),
.statusTable = N(statusTable_8022205C),
.escapeChance = 50,
.airLiftChance = 95,

View File

@ -198,7 +198,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 70,
.partCount = ARRAY_COUNT(N(partsTable_80227AB4)),
.partsData = N(partsTable_80227AB4),
.script = N(init_80227C20),
.script = &N(init_80227C20),
.statusTable = N(statusTable_80227A08),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 50,
.partCount = ARRAY_COUNT(N(partsTable_802219C8)),
.partsData = N(partsTable_802219C8),
.script = N(init_80221A60),
.script = &N(init_80221A60),
.statusTable = N(statusTable_8022191C),
.escapeChance = 50,
.airLiftChance = 0,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021ADD0)),
.partsData = N(partsTable_8021ADD0),
.script = N(init_8021AE68),
.script = &N(init_8021AE68),
.statusTable = N(statusTable_8021AD24),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021FED0)),
.partsData = N(partsTable_8021FED0),
.script = N(init_8021FF68),
.script = &N(init_8021FF68),
.statusTable = N(statusTable_8021FE24),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -87,7 +87,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_80224AEC)),
.partsData = N(partsTable_80224AEC),
.script = N(init_80224B38),
.script = &N(init_80224B38),
.statusTable = N(statusTable_80224A40),
.escapeChance = 50,
.airLiftChance = 85,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021E3D0)),
.partsData = N(partsTable_8021E3D0),
.script = N(init_8021E468),
.script = &N(init_8021E468),
.statusTable = N(statusTable_8021E324),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -83,7 +83,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8022CC34)),
.partsData = N(partsTable_8022CC34),
.script = N(init_8022CC80),
.script = &N(init_8022CC80),
.statusTable = N(statusTable_8022CB88),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_802192D0)),
.partsData = N(partsTable_802192D0),
.script = N(init_80219368),
.script = &N(init_80219368),
.statusTable = N(statusTable_80219224),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -223,7 +223,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8022977C)),
.partsData = N(partsTable_8022977C),
.script = N(init_8022987C),
.script = &N(init_8022987C),
.statusTable = N(statusTable_80229624),
.escapeChance = 50,
.airLiftChance = 90,

View File

@ -109,7 +109,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_80227564)),
.partsData = N(partsTable_80227564),
.script = N(init_802275D4),
.script = &N(init_802275D4),
.statusTable = N(statusTable_802274B8),
.escapeChance = 50,
.airLiftChance = 85,

View File

@ -65,7 +65,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021C8D0)),
.partsData = N(partsTable_8021C8D0),
.script = N(init_8021C968),
.script = &N(init_8021C968),
.statusTable = N(statusTable_8021C824),
.escapeChance = 60,
.airLiftChance = 85,

View File

@ -130,7 +130,7 @@ ActorBlueprint N(slot_machine_stop) = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_8022DFEC)),
.partsData = N(partsTable_8022DFEC),
.script = N(init_8022E060),
.script = &N(init_8022E060),
.statusTable = N(statusTable_8022DF40),
.escapeChance = 0,
.airLiftChance = 0,
@ -153,7 +153,7 @@ ActorBlueprint N(slot_machine_start) = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_8022DFEC)),
.partsData = N(partsTable_8022DFEC),
.script = N(init_8022E060),
.script = &N(init_8022E060),
.statusTable = N(statusTable_8022DF40),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -125,7 +125,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8021D66C)),
.partsData = N(partsTable_8021D66C),
.script = N(init_8021D750),
.script = &N(init_8021D750),
.statusTable = N(statusTable_8021D5C0),
.escapeChance = 40,
.airLiftChance = 90,
@ -148,7 +148,7 @@ ActorBlueprint N(2) = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8021D6B4)),
.partsData = N(partsTable_8021D6B4),
.script = N(init_8021D7C4),
.script = &N(init_8021D7C4),
.statusTable = N(statusTable_8021D5C0),
.escapeChance = 40,
.airLiftChance = 90,

View File

@ -133,7 +133,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80218338)),
.partsData = N(partsTable_80218338),
.script = N(init_80218534),
.script = &N(init_80218534),
.statusTable = N(statusTable_8021828C),
.escapeChance = 70,
.airLiftChance = 90,

View File

@ -75,7 +75,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_80219DD8)),
.partsData = N(partsTable_80219DD8),
.script = N(init_80219E6C),
.script = &N(init_80219E6C),
.statusTable = N(statusTable_80219D2C),
.escapeChance = 0,
.airLiftChance = 20,

View File

@ -111,7 +111,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 3,
.partCount = ARRAY_COUNT(N(partsTable_8021A70C)),
.partsData = N(partsTable_8021A70C),
.script = N(init_8021A758),
.script = &N(init_8021A758),
.statusTable = N(statusTable_8021A5B4),
.escapeChance = 70,
.airLiftChance = 90,

View File

@ -61,7 +61,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_80219018)),
.partsData = N(partsTable_80219018),
.script = N(init_80219088),
.script = &N(init_80219088),
.statusTable = N(statusTable_80218F6C),
.escapeChance = 50,
.airLiftChance = 100,

View File

@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8022B564)),
.partsData = N(partsTable_8022B564),
.script = N(init_8022DC2C),
.script = &N(init_8022DC2C),
.statusTable = N(statusTable_8022B4B8),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -218,7 +218,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 10,
.partCount = ARRAY_COUNT(N(partsTable_8021A748)),
.partsData = N(partsTable_8021A748),
.script = N(init_8021A968),
.script = &N(init_8021A968),
.statusTable = N(statusTable_8021A690),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_80225624)),
.partsData = N(partsTable_80225624),
.script = N(init_80227CEC),
.script = &N(init_80227CEC),
.statusTable = N(statusTable_80225578),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_802285C4)),
.partsData = N(partsTable_802285C4),
.script = N(init_8022AC8C),
.script = &N(init_8022AC8C),
.statusTable = N(statusTable_80228518),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -70,7 +70,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 5,
.partCount = ARRAY_COUNT(N(partsTable_8022E504)),
.partsData = N(partsTable_8022E504),
.script = N(init_80230BCC),
.script = &N(init_80230BCC),
.statusTable = N(statusTable_8022E458),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80218344)),
.partsData = N(partsTable_80218344),
.script = N(init_80218390),
.script = &N(init_80218390),
.statusTable = N(statusTable_80218298),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -239,7 +239,7 @@ typedef struct ActorBlueprint {
/* 0x08 */ s16 partCount;
/* 0x0A */ char unk_0A[2];
/* 0x0C */ struct ActorPartBlueprint* partsData;
/* 0x10 */ Bytecode* script;
/* 0x10 */ EvtScript* script;
/* 0x14 */ s32* statusTable;
/* 0x18 */ u8 escapeChance;
/* 0x19 */ u8 airLiftChance;

View File

@ -58,7 +58,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_80219808)),
.partsData = N(partsTable_80219808),
.script = N(init_802198EC),
.script = &N(init_802198EC),
.statusTable = N(statusTable_8021975C),
.escapeChance = 90,
.airLiftChance = 100,

View File

@ -68,7 +68,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_8021CA44)),
.partsData = N(partsTable_8021CA44),
.script = N(init_8021CB74),
.script = &N(init_8021CB74),
.statusTable = N(statusTable_8021C998),
.escapeChance = 70,
.airLiftChance = 90,

View File

@ -80,7 +80,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 7,
.partCount = ARRAY_COUNT(N(partsTable_8021F99C)),
.partsData = N(partsTable_8021F99C),
.script = N(init_8021F9E8),
.script = &N(init_8021F9E8),
.statusTable = N(statusTable_8021F8F0),
.escapeChance = 60,
.airLiftChance = 90,

View File

@ -129,7 +129,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_8021B280)),
.partsData = N(partsTable_8021B280),
.script = N(init_8021B3E8),
.script = &N(init_8021B3E8),
.statusTable = N(statusTable_8021B1D4),
.escapeChance = 90,
.airLiftChance = 100,

View File

@ -126,7 +126,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_8021EC6C)),
.partsData = N(partsTable_8021EC6C),
.script = N(init_8021EE0C),
.script = &N(init_8021EE0C),
.statusTable = N(statusTable_8021EBC0),
.escapeChance = 60,
.airLiftChance = 95,

View File

@ -77,7 +77,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 12,
.partCount = ARRAY_COUNT(N(partsTable_8021B1AC)),
.partsData = N(partsTable_8021B1AC),
.script = N(init_8021B1F8),
.script = &N(init_8021B1F8),
.statusTable = N(statusTable_8021B100),
.escapeChance = 60,
.airLiftChance = 20,

View File

@ -71,7 +71,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 4,
.partCount = ARRAY_COUNT(N(partsTable_8021C984)),
.partsData = N(partsTable_8021C984),
.script = N(init_8021CAAC),
.script = &N(init_8021CAAC),
.statusTable = N(statusTable_8021C8D8),
.escapeChance = 60,
.airLiftChance = 70,

View File

@ -59,7 +59,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 2,
.partCount = ARRAY_COUNT(N(partsTable_8021E468)),
.partsData = N(partsTable_8021E468),
.script = N(init_8021E54C),
.script = &N(init_8021E54C),
.statusTable = N(statusTable_8021E3BC),
.escapeChance = 90,
.airLiftChance = 95,

View File

@ -135,7 +135,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80223C90)),
.partsData = N(partsTable_80223C90),
.script = N(init_80225F58),
.script = &N(init_80225F58),
.statusTable = N(statusTable_80223B38),
.escapeChance = 40,
.airLiftChance = 80,
@ -158,7 +158,7 @@ ActorBlueprint N(flying) = {
.maxHP = 11,
.partCount = ARRAY_COUNT(N(partsTable_80223CB4)),
.partsData = N(partsTable_80223CB4),
.script = N(init_80225FBC),
.script = &N(init_80225FBC),
.statusTable = N(statusTable_80223BE4),
.escapeChance = 40,
.airLiftChance = 95,

View File

@ -69,7 +69,7 @@ ApiStatus func_80238000_6FAD10(Evt* script, s32 isInitialCall) {
ApiStatus func_80238244_6FAF54(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partnerActor = battleStatus->partnerActor;
ActorMovement* partnerActorMovement = &partnerActor->state;
ActorState* partnerActorMovement = &partnerActor->state;
if (isInitialCall) {
partnerActor->state.currentPos.x = partnerActor->currentPos.x;
@ -306,7 +306,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80238734)),
.partsData = N(partsTable_80238734),
.script = N(init_80238780),
.script = &N(init_80238780),
.statusTable = N(statusTable_80238688),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -301,7 +301,7 @@ ActorBlueprint N(goombario) = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_802392A4)),
.partsData = N(partsTable_802392A4),
.script = N(init_802392F0),
.script = &N(init_802392F0),
.statusTable = N(statusTable_802391F8),
.escapeChance = 0,
.airLiftChance = 0,

View File

@ -64,7 +64,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_802380C4)),
.partsData = N(partsTable_802380C4),
.script = N(init_80238110),
.script = &N(init_80238110),
.statusTable = N(statusTable_80238018),
.spinSmashReq = 4,
.powerBounceChance = 80,

View File

@ -28,7 +28,7 @@ extern EvtScript N(8023C754);
ApiStatus func_80238000_6F5E80(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partnerActor = battleStatus->partnerActor;
ActorMovement* partnerActorMovement = &partnerActor->state;
ActorState* partnerActorMovement = &partnerActor->state;
if (isInitialCall) {
partnerActor->state.currentPos.x = partnerActor->currentPos.x;
@ -191,7 +191,7 @@ ActorBlueprint NAMESPACE = {
.maxHP = 99,
.partCount = ARRAY_COUNT(N(partsTable_80238524)),
.partsData = N(partsTable_80238524),
.script = N(init_80238570),
.script = &N(init_80238570),
.statusTable = N(statusTable_80238478),
.escapeChance = 0,
.airLiftChance = 0,

Some files were not shown because too many files have changed in this diff Show More